Jump to content

Reference Channel in Variable


7ofDiamonds

Recommended Posts

The variables pane is meant for environment variables and settings (strings).

 

The easiest way to reference a parameter is by doing right click and copy parameter. Then paste the parameter using the right click menu at the location you want to reference it.

 

This video should be helpful:

Link to comment
Share on other sites

I watched the video but it didn't answer my question.

 

Is it possible to create a Variable that can be controlled by a slider?

The variables pane is meant for environment variables and settings (strings).

 

The easiest way to reference a parameter is by doing right click and copy parameter. Then paste the parameter using the right click menu at the location you want to reference it.

 

This video should be helpful:

 

Link to comment
Share on other sites

Guest mantragora

You got this opposite. Variables are propagated down the line, so they can feed what you have in Houdini. You don't feed them up from some data in Houdini. Think about them like a top most directory. If you modify it, everything below changes. If you change something below, top most directory doesn't care about it.

Actually, think about them like if they were Constants. You set them once.

 

What you want to do? 

  • Like 1
Link to comment
Share on other sites

That cleared things up! Instead of using the variable, I just referenced the channel that I wanted to change to the slider. Thanks! :)

You got this opposite. Variables are propagated down the line, so they can feed what you have in Houdini. You don't feed them up from some data in Houdini. Think about them like a top most directory. If you modify it, everything below changes. If you change something below, top most directory doesn't care about it.

Actually, think about them like if they were Constants. You set them once.

 

What you want to do? 

Link to comment
Share on other sites

  • 9 months later...

@7ofDiamonds: Can you post example code on how to do this?

 

I just ran into a similar need. I want to use a python script to drive channels in other nodes. I assume this is possible but I can't figure out the syntax.

 

In it's simplest form here is what I am talking about.

ch("blend1") = 0.5

This does not work in python. But that is the intention of what I want my python code to do.

 

Does anyone have  any tips?

 

Thanks

Link to comment
Share on other sites

After some research I discovered that what Houdini calls "channels", Python calls "parms" or parameters.

So the solution is to set a value for a parameter on a given node.

target_node = hou.node('/obj/simplemale1')
p = target_node.parm("blend1")
p.set(0.5)
Edited by Atom
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...