PDA

View Full Version : delete render layers


Plafstarlight
11-26-2010, 04:12 PM
After rending a bunch of stills, I have left over renderLayers bogging down my source file. I would like to get rid of them, and would select then delete however I cannot see themin the Layer Editor. So I am trying to use python in Maya to make a list of all the render layers and delete them. (which conveniently leaves me with the defaultRenderLayer ). I figured out how to select the current render layer, c.editRenderLayerGlobals(q=1, crl=1) but not the rest. Thanks for any help!

jaydru
11-26-2010, 04:29 PM
for each in c.ls(type='renderLayer'):
if each != 'defaultRenderLayer':
c.delete(each)

try that

Plafstarlight
11-26-2010, 04:49 PM
I just did c.delete(c.ls(type='renderLayer')) and got what I want. I did get an error for defautRenderLayer, # Error: Non-deletable node 'defaultRenderLayer' cannot be deleted. # , but I knew that would happen and I want to keep the masterLayer SOOOOO Success!
thanks jaydru!

jaydru
11-26-2010, 04:51 PM
cool, i fixed the error anyway now XD

CGTalk Moderation
11-26-2010, 04:51 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.