Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 18-07-2016 , 08:36 PM
Registered User
Join Date: Jul 2016
Posts: 1

[Python-Scripting]Deleting non-default read-only cameras.

So i'm writing a python script that saves different shots from a scene in different .ma files.For each shot,only its camera should exist in its .ma file(besides the default ones like persp,front,etc...).Everything was working fine until i tested in one scene where there is this orthographic cameras that i never saw before(they were probably created by the artist).When my script tries to delete it, this message shows up:

# Error: Cannot delete 'Camera4:left' as it has locked or read-only children. #

and the script simply ignore this cameras e continue doing its work.

I tried use the command maya.cmds.lockNode(cam,lock = False) before the maya.cmds.delete(cam) but it seems that the real problem is that this cameras are read-only type.

Any way to delete them? thanks!

# 2 19-07-2016 , 10:05 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Your file probably has references in it. You'll either need to import them into the scene, or add support for them into your script.


Imagination is more important than knowledge.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads