accessing sop paths and channels in expressions

   3281   5   1
User Avatar
Member
66 posts
Joined: July 2005
Offline
I've ran into problem with expressions and after hour of experiments im giving up: i created a node and added 4 parameters to it: 2x op paths, string and float.
What i want is to enter path in “sop path” param, get full path with channel name in “test string” param and get value of that channel in “test float” param. Op paths works as expected, after some time i figured out how to build full path in “string param: chs(”p2“)+”/tz“ + key on that channel.

Now - how to get the actual value of that channel?
Tried ch(ch”tstr")), but it doesn't work.
Any suggestions?

Attachments:
chs.PNG (9.8 KB)

wbr, Mudvin
User Avatar
Member
512 posts
Joined: July 2009
Offline
can you post a hipfile?
It seems to me that your trying to access the value by addressing the field label, you should rather use the name of the field,
try using this expression:
ch(“./tstr”)
Again, it would be easier debugging if you could post a file!

cheers,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
66 posts
Joined: July 2005
Offline
Here is it. Basically i'm trying to create a line between 2 points, but since a “line” sop doesn't have any inputs, i have to use expressions to access geo translate channels. The reason i'm doing it that way is that i want to make a preset/hda to reuse it later by just changing sop paths.

Attachments:
expression_madness.hipnc (54.2 KB)

wbr, Mudvin
User Avatar
Member
512 posts
Joined: July 2009
Offline
oh well, then in this case the expression is:
ch(chs(“./tstr”))

cheers!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
66 posts
Joined: July 2005
Offline
Bingo! It works! Thanks a lot, free beer from me
wbr, Mudvin
User Avatar
Member
66 posts
Joined: July 2005
Offline
By the way: is it possible to access “composite parameters” in houdini, like in maya where you can do “setAttr box1.tx 0.1” or as well “setAttr box1.t 0.1 0.2 0.3”?

At the moment i have quite a long multiline python expression, and i have to repeat it with minimal differences for tx/ty/tz.
wbr, Mudvin
  • Quick Links