Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MtoA - How to manipulate AOV's with Python?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
fabriceQ224F
747 Views, 2 Replies

MtoA - How to manipulate AOV's with Python?

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!

Tags (3)
Labels (3)
2 REPLIES 2
Message 2 of 3

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 ) ) )


// Stephen Blair
// Arnold Renderer Support
Message 3 of 3
fabriceQ224F
in reply to: fabriceQ224F

Thank you Stephen!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report