Community
How to create and manipulate AOV's with Python in Maya? I can create an AOV with this:
aovi = mtoa.aovs.AOVInterface() newAOV = aovi.addAOV('aiAOV_N') print newAOV
But what if I then want to get/set the name of the new AOV's node in the Outliner, to be able to manipulate that node later?
print newAOV gives me this: SceneAOV(u'aiAOV_aiAOV_N', 1) -> how do I extract 'aiAOV_aiAOV_N'?
Thank you!
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
You can do it like this:
import maya.cmds as cmds AOVs = cmds.ls(type='aiAOV') for aov in AOVs: print( cmds.getAttr( '{}.name'.format( aov ) ) )