mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 14:14:33 +00:00
Misc fixes associated to looseAssetFiles handling and lookups for LevelAssets
- Adds proper marking of Load status for levelAsset, so if no mis file is defined then the asset fails to load and has proper error code - Adjusts the get*Path() util methods for getting stuff like postFXPrefix or decal files to have a fallback if one isn't currently defined in the assetDef, as it could be a broken link but the file does exist - Adjusts saving logic of level so it will properly update the levelAsset for postfx prefix or decal files so if they were added after creation of the assetdef, they're saved and updated as expected - Adjusts the setter methods for the *File fields to correctly separate the File variable and Path variable to make things behave more clearly and consistently. - Keeps checks for *.mis.decals file pattern, but shifts new creations of decals files to just be *.decals to better match other level-associated files like *.nav or *.forest
This commit is contained in:
parent
85ffb307cd
commit
f6f06121ab
5 changed files with 108 additions and 26 deletions
|
|
@ -1457,7 +1457,7 @@ bool DecalManager::_createDataFile()
|
|||
if(dot)
|
||||
*dot = '\0';
|
||||
|
||||
dSprintf( fileName, sizeof(fileName), "%s.mis.decals", missionName );
|
||||
dSprintf( fileName, sizeof(fileName), "%s.decals", missionName );
|
||||
|
||||
mDataFileName = StringTable->insert( fileName );
|
||||
|
||||
|
|
@ -1572,8 +1572,8 @@ DefineEngineFunction( decalManagerSave, void, ( String decalSaveFile ), ( "" ),
|
|||
"@param decalSaveFile Filename to save the decals to.\n"
|
||||
"@tsexample\n"
|
||||
"// Set the filename to save the decals in. If no filename is set, then the\n"
|
||||
"// decals will default to <activeMissionName>.mis.decals\n"
|
||||
"%fileName = \"./missionDecals.mis.decals\";\n"
|
||||
"// decals will default to <activeMissionName>.decals\n"
|
||||
"%fileName = \"./missionDecals.decals\";\n"
|
||||
"// Inform the decal manager to save the decals for the active mission.\n"
|
||||
"decalManagerSave( %fileName );\n"
|
||||
"@endtsexample\n"
|
||||
|
|
@ -1603,7 +1603,7 @@ DefineEngineFunction( decalManagerLoad, bool, ( const char* fileName ),,
|
|||
"false if it could not.\n"
|
||||
"@tsexample\n"
|
||||
"// Set the filename to load the decals from.\n"
|
||||
"%fileName = \"./missionDecals.mis.decals\";\n"
|
||||
"%fileName = \"./missionDecals.decals\";\n"
|
||||
"// Inform the decal manager to load the decals from the entered filename.\n"
|
||||
"decalManagerLoad( %fileName );\n"
|
||||
"@endtsexample\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue