Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to add AOV output drivers with Python?

4 REPLIES 4
Reply
Message 1 of 5
llamCAN4Q
395 Views, 4 Replies

Is there a way to add AOV output drivers with Python?

I'm trying to denoise existing files by adding variance to new output drivers for a lot of the AOV's. Is there a way to script this?

Thanks!

Tags (3)
Labels (3)
4 REPLIES 4
Message 2 of 5
Stephen.Blair
in reply to: llamCAN4Q

You need to render to get the variance AOVs.

You could use the Python api to update an ass file (add driver nodes, update the options.output parameter) and then render.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 5

back to this question, if I have certain AOVs on my scene let's say diffuse and specular and I want to run a script to search for those AOVs and create a new driver output for each of them and set this new output to variance, is there a way to do so ?

Thanks

Message 4 of 5

Since this question is in the Arnold Core Renderer space, my previous answer still applies. You can use the Arnold Python API to load the ass file, inspect the outputs, and modify them (eg add driver nodes, update the options.output parameter)


// Stephen Blair
// Arnold Renderer Support
Message 5 of 5

createNode aiAOVDriver -n "holaD";

createNode aiAOVFilter -n "holaF";

setAttr "holaF.ai_translator" -type "string" "variance";

connectAttr holaF.message aiAOV_test.outputs[1].filter;

connectAttr holaD.message aiAOV_test.outputs[1].driver;




setAttr "defaultRenderGlobals.currentRenderer" -l 0;

setAttr "defaultRenderGlobals.currentRenderer" -type "string" arnold;

deleteUI "unifiedRenderGlobalsWindow";

unifiedRenderGlobalsWindow;

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

Post to forums  

Autodesk Design & Make Report