mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Adds cleanup of material and terrain material objects when creating a new asset of the respective type to avoid collisions when we immediately properly init the asset on creation
Reorganizes the terrainMaterialDlg to use a split container for better usability, fixed some minor layout issues, and added in FX material fields to be able to edit those directly via the terrain mat editor Updated the terrainMaterialDlg save logic to better sequence the steps for saving to allow stable in-place creation of asset for stub materials due to missing references Updated the terrainMaterialDlg save logic to properly save out all the material effects stuff like footstep flags, effect colors, or sounds.
This commit is contained in:
parent
81aa43a4bd
commit
85bb4cbff3
4 changed files with 442 additions and 1286 deletions
|
|
@ -21,6 +21,9 @@ function AssetBrowser::createMaterialAsset(%this)
|
|||
|
||||
TamlWrite(%asset, %tamlpath);
|
||||
|
||||
//cleanup before proper init'ing
|
||||
%assetName.delete();
|
||||
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
|
|||
|
||||
TamlWrite(%asset, %tamlpath);
|
||||
|
||||
//cleanup before proper init'ing
|
||||
%matDef.delete();
|
||||
%fxMatDef.delete();
|
||||
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue