mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-09 14:35:20 +00:00
Merge pull request #1657 from Azaezel/alpha41/singletonSpam
dont try and recreate singletons
This commit is contained in:
commit
9cd04a2a67
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