Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Why cmds.ogsRender() does not recognize the render layer?

Why cmds.ogsRender() does not recognize the render layer?

g2m.agent
Collaborator Collaborator
685 Views
3 Replies
Message 1 of 4

Why cmds.ogsRender() does not recognize the render layer?

g2m.agent
Collaborator
Collaborator

this code works fine:

 

cmds.ogsRender(cam="", h=512, w=512, cv=True, ems=True)

 

but when I specify a render layer, I got an error:

 

cmds.ogsRender(cam="", layer="render_layer", h=512, w=512, cv=True, ems=True)
# Error: RuntimeError: file <maya console> line 1: Cannot find specified layer. # 

 

that render layer actually exists.

maya_r4Irc2Si8p.png

0 Likes
Accepted solutions (1)
686 Views
3 Replies
Replies (3)
Message 2 of 4

lucericr
Autodesk
Autodesk
Accepted solution

it's because that parameter was for the legacy render layers in maya, a feature that is now hidden in the UI by default. The new system is called "renderSetup"
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Maya-Ren...

0 Likes
Message 3 of 4

g2m.agent
Collaborator
Collaborator

This should be pointed out in the ogsRender manual! I spent hours trying to figure out what was wrong!

Message 4 of 4

lucericr
Autodesk
Autodesk

I'll try to have that mentioned in the doc for the future, but we don't have a mecanism that i'm aware of to update documentation for older versions

0 Likes