mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-14 01:40:50 +00:00
dont try and recreate singletons
This commit is contained in:
parent
a80502d50d
commit
0f827ac89e
1 changed files with 7 additions and 9 deletions
|
|
@ -641,16 +641,14 @@ function MaterialEditorGui::setActiveMaterial( %this, %material )
|
|||
MaterialEditorGui.currentMaterial = %material;
|
||||
MaterialEditorGui.lastMaterial = %material;
|
||||
|
||||
// we create or recreate a material to hold in a pristine state
|
||||
// or, this crashes the ap. fix properly - BJR
|
||||
//if(isObject(notDirtyMaterial))
|
||||
// notDirtyMaterial.delete();
|
||||
|
||||
singleton Material(notDirtyMaterial)
|
||||
if(!isObject(notDirtyMaterial))
|
||||
{
|
||||
mapTo = "matEd_mappedMat";
|
||||
diffuseMapAsset[0] = "ToolsModule:matEd_mappedMat_image";
|
||||
};
|
||||
singleton Material(notDirtyMaterial)
|
||||
{
|
||||
mapTo = "matEd_mappedMat";
|
||||
diffuseMapAsset[0] = "ToolsModule:matEd_mappedMat_image";
|
||||
};
|
||||
}
|
||||
|
||||
// Converts the texture files into absolute paths.
|
||||
MaterialEditorGui.convertTextureFields();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue