[Maya] Non-deletable node '{Node Name}' cannot be deleted

Hi

I’m importing an FBX file from 3DS Max to Maya.
For some reason, I am unable to delete a nondefault layer. You can see an illustration of the problem here:
https://www.dropbox.com/s/hd7kf07coowwgr7/MYA077_unable_to_delete_nodes.mp4?dl=0

So far I have tried the following solution but still failed
A) Selecting the layer directly (through MEL) and deleting it
B) Unlocking the node as suggested by this thread

I understand that you can’t delete default objects say deleting lambert1 but again the layer I am trying to delete is nondefault.

You can check the illustration file here:

Is there a way around this?

Thank you for looking at my problem.

It seems that somehow while importing Maya’s “defaultLayer” gets renamed and unhidden to in your case “studio_layer”?

1 Like

Hello, somehow the layer ‘studio_layer’ has essentially taken the defaultLayer’s spot in the file and the defaultLayer is missing. You can see this by selecting the layerManager - cmds.select(‘layerManager’) and notice that studio_setup is in the primary spot for the enum, and there isn’t a default layer in the list.

How this file got to this place I am uncertain. If you want to delete the node you need to recreate the defaultLayer, the easiest way I know of to do that is to import this scene in instead of opening it making sure your import options have the Merge into selected namespace and rename incoming objects that match as the namespace option.

1 Like

@JesseFK and @KritterSG

Thanks for the response.
This solution works as expected: import this scene in instead of opening it making sure your import options have the Merge

Thanks again. Have a great day ahead!

another way to reset the file without importing it, is deleting these lines from the maya ascii file:

createNode displayLayer -n “studio_setup”;
rename -uid “9A8A19D4-4630-1EC4-7BE3-DA9BFA7B63D7”;
setAttr “.e” no;
setAttr “.v” no;
setAttr “.c” 4;
setAttr “.do” 1;

it will fix the scene and recreate the default layer for you, it can prevent some additional unwanted info in your scene

2 Likes

@peerke88

Interesting. So that’s what they mean when they said “You can modify the ascii file to solve problems”.
Thanks for the alternative solution!

i have a question regarding this topic please if any one can help
i have ziva animation in Maya and when i export the Animation as FBX , i got an error:

Error: Non-deletable node ‘defaultLayer’ cannot be deleted.

Warning: Nothing is selected. Select objects or components to delete.

how could i fix that in Maya 2022?
Thanks in advance

i have a question regarding this topic please if any one can help
i have ziva animation in Maya and when i export the Animation as FBX , i got an error:

Error: Non-deletable node ‘defaultLayer’ cannot be deleted.

Warning: Nothing is selected. Select objects or components to delete.

how could i fix that in Maya 2022?
Thanks in advance

this is a different thing, defaultLayer is a default node. so it cannot be deleted and will be autogenerated if removed from the maya ascii file.

you might want to check why it tries to delete the default layer

1 Like

thanks a lot for replying.
i have no idea why Maya needs to delete this default layer and i tried to open another Maya version 2020 to check if the version is the reason! but i also got the Error message !!

Hi @Rehab

AFAIK, you can’t delete defaultLayer or any default objects such as you can’t really delete a lambert1 or defaultLightSet.

1 Like

yes i know , but every time when i run the script, i got this Error message and i don’t know what to do in Maya 2022 to avoid this Error message?!!
and the script i run is related to export animation as FBX , so there’s nothing in the script trying to delete the default layer!!