BaiLong
BaiLong
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
Is setprimattrib() a deferred function? 2019年4月5日13:10
Hello,
I'm trying to set a primitive attribute in a detail wrangle, using.
For whatever reason the function is not executed at runtime, but after the whole wrangle.
Saying:
returns the same value for bothcalls, instead of returning the new value on the second call.
Is this expected? I'm quite sure it's at least not desired.
I also include an example file. This is from a more complex thing I'm trying to solve, where I write a value onto different prims if they meet certain criteria. Therefor I can't do it in two wrangles or in a primitive wrangle.
Thanks for any help or pointers!
PS: I tried in h16.5 and h17. I'm running on linux so thecalls just output something to the terminal.
I'm trying to set a primitive attribute in a detail wrangle, using
setprimattrib()
For whatever reason the function is not executed at runtime, but after the whole wrangle.
Saying:
prim(0, "primvariable", i);
setprimattrib(0, "primvariable", i, primvalue, "set");
prim(0, "primvariable", i);
returns the same value for both
prim()
Is this expected? I'm quite sure it's at least not desired.
I also include an example file. This is from a more complex thing I'm trying to solve, where I write a value onto different prims if they meet certain criteria. Therefor I can't do it in two wrangles or in a primitive wrangle.
Thanks for any help or pointers!
PS: I tried in h16.5 and h17. I'm running on linux so the
printf()
Python script to change operator type 2015年11月19日17:12
Oh wow, that was easy! ops:
I wasn't thinking of looking in the API for the operations on Node. I only looked at NodeType…
Thanks so much!!!
I wasn't thinking of looking in the API for the operations on Node. I only looked at NodeType…
Thanks so much!!!
Python script to change operator type 2015年11月19日14:58
Hi,
I would like to use python to run whatever functions are executed when you use the righ click menu > “Change Type…” on a Node. Because I have to do it on a number of nodes.
Does anyone have an idea how to change the operator type of a node?
That's what I have so far:
changeNodes =
objs = hou.root().recursiveGlob('*', hou.nodeTypeFilter.Obj)
for o in objs:
if o.type().name() == ‘nodeType_A’:
changeNodes.append(o)
for c in changeNodes:
#change nodeType to ‘nodeType_B’
#Keep name
#Keep Parameters
Any ideas? If there is a way to just get whatever code is run when I use the “Change Type…” that would already be of huge help!
Thanks a lot!
–Markus
I would like to use python to run whatever functions are executed when you use the righ click menu > “Change Type…” on a Node. Because I have to do it on a number of nodes.
Does anyone have an idea how to change the operator type of a node?
That's what I have so far:
changeNodes =
objs = hou.root().recursiveGlob('*', hou.nodeTypeFilter.Obj)
for o in objs:
if o.type().name() == ‘nodeType_A’:
changeNodes.append(o)
for c in changeNodes:
#change nodeType to ‘nodeType_B’
#Keep name
#Keep Parameters
Any ideas? If there is a way to just get whatever code is run when I use the “Change Type…” that would already be of huge help!
Thanks a lot!
–Markus