catchyid Posted April 8, 2017 Share Posted April 8, 2017 (edited) [Okay answered one of my questions: setCurrent() is hou.Node() method just makes its node current --> Basically this enables the paint functionality. Still have the second part unanswered ] Hi, I am watching an online tutorial, the scene has a geometry node, which has a SOP Paint node (e.g. /obj/geo1/paint1). To activate the paint function (on paint1 node), the author of the tutorial calls hou.node("/obj/geo1/paint1").setCurrent(True,True) and magically Houdini switches to paint mode?! Now, I could not find "setCurrent()" function on hou.Node, neither on hou.SopNode nodes, FYI when I print the paint node info on the shell I get <hou.SopNode of type paint at /obj/geo1/paint1>. My question, where this function "setCurrent" comes from? Second question: nodes have parameters such as tx,ty,tz and possibly some actions defined by buttons (e.g. in output rop drive has "Save" button which saves the input geometry to disk), my question: accessing nodes parameters is easy (i.e. hou.node("..").parm("tx")), BUT how to access the functions or callbacks defined in the node, for example how to execute whatever "Save" button runs as python calls? i.e. If I have a node that defines many buttons such that each button does a specific task, how can I call execute (or click) these buttons in python? Thanks, Edited April 8, 2017 by catchyid Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted April 8, 2017 Share Posted April 8, 2017 http://www.sidefx.com/docs/houdini16.0/hom/hou/Node setCurrent is there. Quote how to access the functions or callbacks defined in the node hou.Parm.pressButton() if you want just fire up parameter callback. hou.Parm.parmTemplate().scriptCallback() to get callback string. hou.Node.type().hdaModule() to get python module object for that type. 1 Quote Link to comment Share on other sites More sharing options...
catchyid Posted April 8, 2017 Author Share Posted April 8, 2017 Thanks Alex 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.