7ofDiamonds Posted February 8, 2015 Share Posted February 8, 2015 I'm trying to link a channel to a variable. I've tried copying the absolute path (with and without "ch") but to no avail. How can I do this? See the diagram attached. Quote Link to comment Share on other sites More sharing options...
ayidi Posted February 8, 2015 Share Posted February 8, 2015 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: Quote Link to comment Share on other sites More sharing options...
7ofDiamonds Posted February 9, 2015 Author Share Posted February 9, 2015 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: Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 9, 2015 Share Posted February 9, 2015 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? 1 Quote Link to comment Share on other sites More sharing options...
7ofDiamonds Posted February 9, 2015 Author Share Posted February 9, 2015 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? Quote Link to comment Share on other sites More sharing options...
Atom Posted November 14, 2015 Share Posted November 14, 2015 @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 Quote Link to comment Share on other sites More sharing options...
Atom Posted November 15, 2015 Share Posted November 15, 2015 (edited) 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 November 15, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.