Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"cannot delete as it has locked or read-only children."

Message 1 of 4
10294 Views, 3 Replies

"cannot delete as it has locked or read-only children."

Cant find a fix to this online. 
Purchased this Character rig and looking to delete everything (just a duplicated rig I have).

Script editor shows for a number of character controls:
// Error: file: C:/Program Files/Autodesk/Maya2022/scripts/others/doDelete.mel line 111: Cannot delete 'MaleFullBody:MaleFullBody_ROOTGrp' as it has locked or read-only children. //"


Any advice would be appreciated




Message 2 of 4

There could be various reasons the nodes get locked.

If you can detect which node/s is/are locked, you can execute lockNode command (see the syntax examples at the bottom of the page).

For multiple selected nodes, try this (untested):

string $sel[] = `ls -sl` ;
for ($s in $sel) {
    lockNode -l off $s ;

 If you want to unlock entire hierarchy, then select the top node and go Select>Hierarchy before script execution.

Afterwards, should be possible to delete.

Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Message 3 of 4

I had this problem with Golaem nodes and the MEL script orked perfectly, thank you !

Message 4 of 4

I had this problem and it was because I forgot that the model was referenced. I went to original file and the nodes deleted easily

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report