Merge pull request #1657 from Azaezel/alpha41/singletonSpam

dont try and recreate singletons
This commit is contained in:
Brian Roberts 2026-01-19 21:37:10 -06:00 committed by GitHub
commit 9cd04a2a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();