![]() NumOfCustomAOVs = cmds.getAttr(shadingGroup+'.When you work for a big VFX or animation studio you usually light your shots with different complex light rigs, often developed by highly talented people.īut when you are working at home or for small studios or doing freelance tasks or whatever else. ![]() Print 'No need to create a new customAOV' If not cmds.objExists('aiAOV_Default_Color'):ĬustomAOV = cmds.createNode('aiAOV',n='aiAOV_Default_Color', skipSelect=True)Ĭmds.setAttr(customAOV+'.name','Default_Color',type='string')Ĭmds.connectAttr(customAOV+'.message','defaultArnoldRenderOptions.aovList',force=1)Ĭmds.connectAttr('ssage',customAOV+'.outputs.driver', force=1)Ĭmds.connectAttr('ssage',customAOV+'.outputs.filter', force=1) Here is the code: '''check whether the aiAOV_Default_Color exists''' It seems that there is an initialization issue. Usually, when one creates a custom AOV from Render settings it automatically adds the AOV to a shading group list of aiCustomAOVS. If I divide the code to two parts (create an AOV and query the attribute of shading group) and run them separately I get the result, but I think it is not the proper way of doing that. The print gives me zero as a number of AOVs of the shading group (see the last line of the code). I cannot access a newly created aiCustomAOV of my shading group (Arnold). I am starting working in maya and python and here is the first problem I faced:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |