robert okker
rokker
About Me
vfx Suppervisor
EXPERTISE
CG Supervisor
INDUSTRY
Film/TV
Connect
LOCATION
Netherlands
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
setting Python relative reference May 27, 2021, 1:31 p.m.
Ok it's a bit of an ugly solution and if anyone has a proper i would really like to know.
But for now i gist set .revertToDefaults() and then rund the part to set relative ref again.
This works for now
Cheers
Robert
But for now i gist set .revertToDefaults() and then rund the part to set relative ref again.
This works for now
Cheers
Robert
setting Python relative reference May 27, 2021, 10:02 a.m.
I tried than unfortunately that didn't work.
Or at least it sets the expression correct but also adds a key frame or some sort. (the .parm becomes green in the node)
So the relative reference doesn't work then.
So if people have a solution for this that would be perfect to
Or at least it sets the expression correct but also adds a key frame or some sort. (the .parm becomes green in the node)
So the relative reference doesn't work then.
So if people have a solution for this that would be perfect to
setting Python relative reference May 26, 2021, 5:49 p.m.
So im back into python and come across 1 problem i can't figure out.
so what i want to do is get the selected arnoldImage node and set that to another usdUvTexture node.
All work fine if you run it once.
so the relative path is set automaticly and in the usdUvTexture node in the file i get `chs("../ARN_new/BaseColor/filename")`
wich is correct as it is the relative path to the arnoldImage node
but as soon as i run it another time to update it so it should put `chs("../ARN_new/Roughness/filename")` in the node it doesnt work.
As it automatically fills in the ref and instead of updating the usdUvTexture node it fills it in the arnoldImage.
is there any way to solve this
so what i want to do is get the selected arnoldImage node and set that to another usdUvTexture node.
All work fine if you run it once.
so the relative path is set automaticly and in the usdUvTexture node in the file i get `chs("../ARN_new/BaseColor/filename")`
wich is correct as it is the relative path to the arnoldImage node
but as soon as i run it another time to update it so it should put `chs("../ARN_new/Roughness/filename")` in the node it doesnt work.
As it automatically fills in the ref and instead of updating the usdUvTexture node it fills it in the arnoldImage.
is there any way to solve this
import sys import toolutils import hou ##make selection selectedNode = hou.selectedNodes()[0] selectedNodeName = str(selectedNode) nodeType = hou.nodeType(selectedNode.path()) ##get parent name and contex path (Arnold material Builder) arnoldMatBuilder = selectedNode.parent() arnoldMatBuilderConnection = arnoldMatBuilder.outputs() arnoldMatBuilderPath = arnoldMatBuilder.parent().path() arnoldMatBuilderName = str(arnoldMatBuilder) amb = hou.node(arnoldMatBuilderPath) texRef = str('`chs("../'+ arnoldMatBuilderName + '/' + selectedNodeName + '/filename")`') usd_tex_base = hou.node(arnoldMatBuilderPath + '/' + "USD_tex_BaseColor_" + (arnoldMatBuilderName[4:])) usd_tex_base.parm('file').set(texRef)