Jump to content

Where to get a list of a node methods/functions in python?


Recommended Posts

[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 by catchyid
Link to comment
Share on other sites

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.

  • Like 1
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...