logix1390 Posted September 16, 2018 Share Posted September 16, 2018 Hello, I have run into a problem that needs a bit of python work. Basically what I am trying to do is create a mantra sop in the `out` context when I click a button in the `obj` context. I found out how to create a node in the same context. For example: file_sop = hou.pwd().parent().createNode("file"); file_sop.parm("file").set(hou.pwd().Make_File_Button("sopoutput")) This will create a file node on spot every time I click the "Make File Button". How can I tell it to place a mantra node in the `out` context where it belongs ? I'm still a beginner in python, any help would be greatly appreciated . I will attach my file for anyone that wants to take a look. Thank you python_make_node_button.hip Quote Link to comment Share on other sites More sharing options...
Atom Posted September 16, 2018 Share Posted September 16, 2018 (edited) Try this code in your button. hou.node("/out").createNode("ifd") To discover information about any node just drop it into the python shell and print information from the various methods available. print dir(n), using the variable displayed below, will provide you with the various methods available on any node. Edited September 16, 2018 by Atom Quote Link to comment Share on other sites More sharing options...
logix1390 Posted September 17, 2018 Author Share Posted September 17, 2018 Perfect. Thank you Atom. Always very helpful. 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.