What is the $C variable?

   5349   2   0
User Avatar
Member
2162 posts
Joined: Sept. 2015
Offline
Hello,

I've tried using the feature of right clicking on a paramter ‘box’ and applying a motionfx.

In my case I used a noise and houdini dropped down a CHOP for that purpose.

However, I have my preferences set to Python and in this case as I have noticed it seems not all nodes have yet been ‘converted’ to scripting preferences.

What I mean is that some nodes have expression pre-sets in h-script but if your preference is python it will lay down a node with the h-script and not python version.

Because of this, in my chop there is a noise node that has a parameter called “Seed” with the expression red highlighted as $C.

I could just change the default script of that node back to H-script but I am interested in learning how to use python as much as possible.

I looked in the docks under the parameter expressions for what I am assuming is a global variable but can't find it.

Not knowing what it represents I can't search for the Python equivalent; like instead of using $F we can use hou.frame().

Maybe its not a global variable at all?

Thanks for any help.
User Avatar
Member
474 posts
Joined: Feb. 2012
Offline
$C in Chops is you current channel number.
Edited by sepu - Oct. 14, 2016 22:10:38
User Avatar
Member
2162 posts
Joined: Sept. 2015
Offline
Cool, thanks sepu.

I guess that's considered a local variable then.

I'm thinking that because I just tried using lvar('C') and I get the same results as hscript with no problems.
  • Quick Links