magneto Posted August 25, 2012 Share Posted August 25, 2012 Hi, I am making an asset where I want to click a button of a node inside the subnet of the asset. I know how to do these for asset parameters but not sure how to do it for a node inside an asset. Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
kgoossens Posted August 25, 2012 Share Posted August 25, 2012 Hi, I am making an asset where I want to click a button of a node inside the subnet of the asset. I know how to do these for asset parameters but not sure how to do it for a node inside an asset. Any ideas? Thanks RMB click button-> Expressions -> edit expression? Is this what you are looking for? Quote Link to comment Share on other sites More sharing options...
magneto Posted August 25, 2012 Author Share Posted August 25, 2012 (edited) Thanks, no I mean something similar to this: kwargs['node'].hdaModule().setHeight(kwargs) where you use a callback script to trigger a button click if the user clicks a button in your asset. But I want to click the button of a node inside the subnet like: kwargs['node'].nodes('/uvproject1/initialize').pressButton() Edited August 25, 2012 by magneto Quote Link to comment Share on other sites More sharing options...
Annon Posted August 25, 2012 Share Posted August 25, 2012 You'll probably need to make the node inside the asset editable and then use this: http://www.sidefx.com/docs/houdini12.0/hom/hou/Parm#pressButton Quote Link to comment Share on other sites More sharing options...
magneto Posted August 25, 2012 Author Share Posted August 25, 2012 Thanks Christian. How do you make the node editable? It's an instance of UVProject SOP. Also I don't know how to access that parameter as it's deep inside the network not at the asset level. Quote Link to comment Share on other sites More sharing options...
ikarus Posted August 25, 2012 Share Posted August 25, 2012 He means in the Type Properties window under Basic just put the uvproject node in the list of "Editable Nodes" 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 25, 2012 Author Share Posted August 25, 2012 Thanks ikarus, I didn't know of that feature. Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted August 25, 2012 Share Posted August 25, 2012 I don't think the node has to be editable in order to trigger the click event on the button. You can also promote buttons from inner nodes to the asset's properties and let users click inner node buttons. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 25, 2012 Author Share Posted August 25, 2012 Thanks hopbin, I will promote it to the asset level, hide and trigger the click in the callback script, because I want to press it anytime they change some numeric values. But if anyone knows how to access a parameter in the subnet from a callback script without promoting it to the asset level, that would be great. Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted August 26, 2012 Share Posted August 26, 2012 Thanks hopbin, I will promote it to the asset level, hide and trigger the click in the callback script, because I want to press it anytime they change some numeric values. But if anyone knows how to access a parameter in the subnet from a callback script without promoting it to the asset level, that would be great. I'm not sure you have to promote it in order to press it. Try something like this, as a Python callback. kwargs['node'].node('inner_node_name').parm('button_name').pressButton() That should work. 1 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.