COP Feedback?

   19940   22   4
User Avatar
Member
1390 posts
Joined: July 2005
Offline
BTW, does any body knows how to put channel reference to parameter with script, not by hand? Simple:

opparm myObject myParam ‘ch(“someParam”)’

doesn't work. I thought that -r option in opparm is for that, but I was wrong.


thanks!
sy.
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
Channel references can be set by hscript as follows:

chadd myObject myParm
chkey -t 0 -F ‘ch(“someParm”)’ myObject/myParm

eg.

chadd geo1 tx
chkey -t 0 -F ‘ch(“ty”)’ geo1/tx

A good way to figure out things like that is to use the opscript command on something like a geo node with a channel reference set on one parameter.

Alternatively, using HOM it can be set by:

hou.node('/obj/geo1').parm('tx').setExpression('ch(“ty”)') or
hou.node('/obj/geo1').parm('tx').set(hou.node('/obj/geo1').parm('ty'))
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
1390 posts
Joined: July 2005
Offline
Thanks grahamt for your explanation.

cheers,
sy.
  • Quick Links