Arnold Custom AOVs

794 views
Skip to first unread message

Daniyar

unread,
Apr 19, 2014, 9:30:34 AM4/19/14
to python_in...@googlegroups.com
Hey guys!

I am starting working in maya and python and here is the first problem I faced:

I cannot access a newly created aiCustomAOV of my shading group. The print gives me zero as a number of AOVs of the shading group (see last line in the code).

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. Right?
Usually, when I create a custom AOV from Render settings it automatically adds the AOV to a shading group list of aiCustomAOVS.
It seems that there is an initialization issue. How to overcome it?

Here is the code:

# check whether the aiAOV_Default_Color exists
if not cmds.objExists('aiAOV_Default_Color'):
    customAOV = cmds.createNode('aiAOV',n='aiAOV_Default_Color', skipSelect=True)
    cmds.setAttr(customAOV+'.name','Default_Color',type='string')
    cmds.connectAttr(customAOV+'.message','defaultArnoldRenderOptions.aovList',force=1)
    cmds.connectAttr('defaultArnoldDriver.message',customAOV+'.outputs[0].driver', force=1)
    cmds.connectAttr('defaultArnoldFilter.message',customAOV+'.outputs[0].filter', force=1)
    print 'AOV has been created'
else:
    print 'No need to create a new customAOV'

# get all shading groups
shadingGroup = cmds.ls('aiStandard1SG')[0]
numOfCustomAOVs = cmds.getAttr(shadingGroup+'.aiCustomAOVs', size=1)
print 'Number of custom AOVs'

paul jordan

unread,
Apr 21, 2014, 10:15:34 AM4/21/14
to python_in...@googlegroups.com
Hi all--

Has anyone been able to dev with maya 2014 and visual studio in win 8 or
8.1. The normal win 7 work flow is
to load the 7.2 sdk and then install visual studio 2010. But I cant
load the 7.2 sdk on windows 8. I have tried
it with the 8.x sdk but it does not work. Also, puting aside VS, has
anyone had success with Cmake in win 8, 8.1
and maya 2014.

thanks!

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Chad Vernon

unread,
Apr 21, 2014, 3:54:42 PM4/21/14
to python_in...@googlegroups.com
Yes I use 8.1 with CMake, Visual Studio and Maya 2014.  Haven't had any issues.  What issues are you seeing?

paul jordan

unread,
Apr 22, 2014, 10:48:11 AM4/22/14
to python_in...@googlegroups.com

Hi-

thanks for reply, chad

I am having trouble getting vs 2010 express to take settings for x64 plug with win 8.0

could you tell me which vs version you are using?   Are you using a win SDK install?

My reference win7 install is using the win 7.1 SDK and patch--but I can  not install

these on win 8.  thanks!
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3cdc0b55-f7c5-41fe-ba3d-bc678512f5ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




Chad Vernon

unread,
Apr 22, 2014, 6:38:30 PM4/22/14
to python_in...@googlegroups.com
If you're on 8.1, you'll probably want to use the 8.1 sdk:



--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/rCtjHQ8Xhrc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5356812B.8020904%40animdevl.com.

paul jordan

unread,
Apr 24, 2014, 12:28:12 PM4/24/14
to python_in...@googlegroups.com

Thanks chad--

so i think the issue is vs 2010.  vs 2012 comes with the 8.0 sdk and vs 2013 comes with the 8.1 sdk.  I  dont think vs 2010 is properly
seeing the 8.0 sdk i had installed.  II have been trying to  use vs 2010 as this is what the per maya docs.    Can you tell me what version
of visual studio you are using?  thanks!

ps  your cg circuit stuff  has been super helpful

For more options, visit https://groups.google.com/d/optout.

Chad Vernon

unread,
Apr 24, 2014, 10:04:41 PM4/24/14
to python_in...@googlegroups.com
I use 2010 for doing Maya plug-ins and 2012 for everything else.  Are you using the Visual Studio 10 Win64 generator in cmake?


paul jordan

unread,
May 4, 2014, 7:33:41 PM5/4/14
to python_in...@googlegroups.com

Thanks for your comments here, chad

I got this to work mostly following your cgcircuit api video

A couple of points to anyone following along

1-you'll need to download win sdk 7.1 in addition to visual studio express 10.  Otherwise,
visual studio cannot compile x64 and you will not se x64 options.  The 7.1 sdk install can be fussy,
you may have to try it a couple of times. (win 8 thing ?)

2-  this is a helpful link with all the vs lib linkages
http://lamdacore.blogspot.ca/2013/05/setup-visual-studio-11-for-maya-2014.html


3-  you will need to add an explicit link to the sdk x64 lib

thanks again!

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages