Asset Bundles: Introduce IAssetBundle and factory interface for bundles to AssetAPI. This is a generic way to AssetAPI internals so that you can request sub assets from bundles, may it be a collada bundle or a zip file. ArchivePlugin now implements a working zip bundle type and factory. Other file types can be supported by simply adding the IAssetBunle implementations to the plugin. You request sub assets normally via ref eg. '<bundleref>#path/to/subasset.mesh', you don't need to request the bundle before hand or worry about anything like that. You will get a asset transfer as before and AssetAPI loads the bundle first then queries your sub asset from it. Additionally implemented Assets Window to show bundles and loaded assets from it. Current zip implementation unpacks the whole zip file to disk and provides the sub asset data from disk. TODO: Support live reloading of bundles and thread the asset bundle unpack stage so it wont block the main loop. Note: This is not final code, will be worked on more.
AssetAPI: Make GetResourceTypeFromAssetRef non-static and query the factories for file extensions they can create assets from. This removes the long time hardcode hack that made AssetAPI aware of the types that each factory can produce, which is quite bad. Similarly ask asset bundle factories the same. AssetBundles: Added proper fullbuild deps for zziplib and zlib (dependency of zziplib).
AssetAPI: Fix/tweak a lot of bundle code paths to be more efficient. Fix ref resolving when the context is a bundle. Fixed local provider not to block if there are lots of failed requests, failing 1000 requests in a row made tundra unresponsive for that whole perioid (frustrating especially in debug mode with all the log spam). ZipBundle: Implemented threaded worker for unzipping so it wont block the main loop. Fixed cache path to be a proper file in asset cache, meaning eg. ogre threaded loading will now work seamlessly when using sub assets in a zip file. Added ArchivePlugin to be default on in windows (linux/mac needs scripts to get the zziplib dep first).
ArhivePlugin: Change log prints to debug, not essential for every day use. Fix a comment to make more sense.
ArchivePlugin: For zip files that are cached (eg. from http provider) check if the zip files need to be extracted. This will save us from always uncompressing the full zip every time. Even if that is threded, with big zip files it will delay us getting the assets from the bundle. Now we check if sub asset has same cache time stamp than its parent zip. If not we extract it and set the last modified stamp to same. This will save us from downloading big zip files (AssetAPI does that automatically) and we dont have to extract a single file for the bundle to be ready if the source was not redownloaded. AssetAPI: Remove some left debug prints and tweak some prints.
ArchivePlugin: Fix and add documentation.
Fix one remaning static AssetAPI::GetResourceTypeFromAssetRef call in the code base. Move one print as debug and fix one documentation slip/duplicate in asset window.
AssetAPI: 'const_iterator' changed to 'iterator' - GCC does not allow const_iterator to be used in erase()
AssetAPI: Fix crash on unload where the bundle factory list was not reseted.
build-mac-deps.bash: Added zziplib for fetching and building
CMake: Enable ArchivePlugin on mac
AssetBundles: Huge bug in the bundle unloading, I managed to make an infinite loop in there (tired + copy pasting is bad combo). Now its fixed and properly tested to work. Good thing we did more testing on this thing and caught this before ended up merged to main repo. Yey for testing.
Merge remote-tracking branch 'rex/tundra2' into admino_archive
AssetCache: Fix opening/creating files via windows api that filename is longer than 260 characters. Fixes #347.
ZipWorker: Simplify the whole worker by making it a QRunnable and running it via QThreadPool. This give the additional benefit of Qt running them where the is room, not just spinning N threads once the zip needs unpacking.
Bundle loading: Dont load the in mem data if there is a valid disk source, avoids unneccesary data shuffling in the load from, this is how normal transfer do it also. Dont start the threaded unzip worker if there is nothing to uncompress.
AssetAPI and providers: Fix transfer aborting so that it wont crash Tundra. New callback to AssetAPI for providers to call on aborted transfers, so that we keep currentTransfers up to date. Fix bad iter crashes when forgetting all assets (abort all trasnfers step), make sure we wont end up to infinite loop there with the new logic.
AssetAPI: Fix loading sub asset from already loaded asset bundles. This could have been fixed hackisly with rputting the virtual transfers to 'readyTransfers', but that does not guarantee loading. The proper way is to delay LoadSubAssetToTransfer call to the next update so that the calling code has time to hook into the virtual transfer before any of the load path signals are emitted. Bug was noticed on mac where async ogre loading was disabled, hence all signals fired before calling code could hook.
Remove debug prints.
Don't override asset (the asset API), call the variable "assetvar" instead. (As per Jonne's comment in #528)

"assetptr" felt iffy, so I called it "asset variable"