Hi,
I have discovered on when I run
mel.eval("MLdeleteUnused();")
in maya 2020.1 that this error is thrown
// Error: line 0: Non-deletable node 'standardSurface1' cannot be deleted. //
And sometimes it will crash maya as well. Looks like standSurface1 is a new default shader in maya. Looks like it was never added to ignore that material during the MLdeleteUnused command. Is this a bug or am i missing something?
anyone have a resolution to this. Can't seem to figure how to get around this, it breaks all of our tools that use the delete unused materials function.
Hi Craig.Lamorte,
This is a known bug in Maya 2020. There will be a fix in an upcoming update or release.
In the meantime, the way to fix this is to add a few lines of code to the MLdeleteUnused.mel file to get a list of default materials and skip deleting them. I've attached the updated MLdeleteUnused.mel file here so you can just replace the old file with this one. The file can be found in C:\Program Files\Autodesk\Maya2020\scripts\others\ .
Regards,
Lanh
Did this get fixed? Im on Maya 2022.3 and am getting
// Error: line 0: Non-deletable node 'standardSurface1' cannot be deleted. Im trying to do "delete unused nodes" option in the hypershade
Can't find what you're looking for? Ask the community or share your knowledge.