Script used to reference an scene with render layers cannot find the layers after referencing.

17 views
Skip to first unread message

Chad_Fox

unread,
Jan 18, 2018, 2:07:36 PM1/18/18
to Python Programming for Autodesk Maya
Hi All

I've come across an issue with my program that is referencing scenes with render layers.  While the script is running, it references, but then cannot find the render layers. The layers seem to complete referencing after the code is executed.

I am currently opening maya via cmd line, running a script via mayapy and in that script, referencing a render scene with layers, then referencing a camera + other assets. Following this, it checks for active render layers to submit to render, but for some reason, It's been unable to find the layers on some of our scenes, but does find them on others.

I've tried adding a line to process idle events in case maya was deferring the layer creation after referencing, but no luck. I used maya.utils.processIdleEvents()


Would love to hear if anyone here has any suggestions, ideas or knowledge as to why this would be happening.

Take care, 

Chad 

Reply all
Reply to author
Forward
0 new messages