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

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

Anonymous
Not applicable
1,041 Views
4 Replies
Message 1 of 5

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

Anonymous
Not applicable

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!

0 Likes
1,042 Views
4 Replies
Replies (4)
Message 2 of 5

Stephen.Blair
Community Manager
Community Manager

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
0 Likes
Message 3 of 5

antoniocarbajoLJEKG
Community Visitor
Community Visitor

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

0 Likes
Message 4 of 5

Stephen.Blair
Community Manager
Community Manager
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
0 Likes
Message 5 of 5

antoniocarbajoLJEKG
Community Visitor
Community Visitor

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;

0 Likes