Changes behavior with suffix appending of asset importer so it doesn't contaminate the original "clean" name, which is used for setting the mapTo value of material definitions

Also adds a sanity check when applying the type suffix to see if it's already there to avoid needless doubleups
Fixes offsetting/positioning behavior on icon buttons to actually respect the icon position variable
Adds sanity checks to ensure we're not trying to utilize a in-process-of-deleting decoy dummy
Fixes handling of sliders in option menus to properly store and test unapplied values
Fixes handling of display device setting to properly store and test unapplied values
Adds additional logic to creation of shape and material asset previews to attempt to force-load dependencies to improve likelihood that they'll actually be loaded when we go to generate the preview.
Temp disables creating cubemap 'assets' via the RMB context menu in the AB
This commit is contained in:
JeffR 2022-04-10 01:40:15 -05:00
parent 96fd520eb7
commit 5c8d8fab00
8 changed files with 108 additions and 31 deletions

View file

@ -892,4 +892,20 @@ DefineEngineFunction( createPath, bool, ( const char* path ),,
return Platform::createPath( pathName );
}
DefineEngineFunction(deleteDirectory, bool, (const char* path), ,
"@brief Delete a directory from the hard drive\n\n"
"@param path Name and path of the folder to delete\n"
"@note THERE IS NO RECOVERY FROM THIS. Deleted files are gone for good.\n"
"@return True if file was successfully deleted\n"
"@ingroup FileSystem")
{
static char fileName[1024];
static char sandboxFileName[1024];
Con::expandScriptFilename(fileName, sizeof(fileName), path);
Platform::makeFullPathName(fileName, sandboxFileName, sizeof(sandboxFileName));
return Platform::deleteDirectory(sandboxFileName);
}
#endif // TORQUE_TOOLS