evilbear Posted June 30, 2012 Share Posted June 30, 2012 Hi all: I have a question, Let's say I have a ROP OUTPUT DRIVER, I set up a button in it, and I want the button to add a file node with correct file path which is the path form ROP OUTPUT DRIVER after click it, what should I do? I'm new to Houdini scripting, so I have no idea where or how to write it. Could somebody please show me how to do it? Thank you. Quote Link to comment Share on other sites More sharing options...
rony Posted July 1, 2012 Share Posted July 1, 2012 Hi all: I have a question, Let's say I have a ROP OUTPUT DRIVER, I set up a button in it, and I want the button to add a file node with correct file path which is the path form ROP OUTPUT DRIVER after click it, what should I do? I'm new to Houdini scripting, so I have no idea where or how to write it. Could somebody please show me how to do it? Thank you. If I understood correctly, you're trying to create a file node in a specified network path not on the file system. If so, then there are 2 ways you can do this but you will need to get the path where you want to create the node. In hscript: opcf /obj/geo1 # parent path opadd file myFile # command to create the node In python: myNode = hou.node("/obj/geo1") # parent path myNode.createNode("file", "myFile") # command to create the node Cheers, Ron Quote Link to comment Share on other sites More sharing options...
evilbear Posted July 2, 2012 Author Share Posted July 2, 2012 (edited) If I understood correctly, you're trying to create a file node in a specified network path not on the file system. If so, then there are 2 ways you can do this but you will need to get the path where you want to create the node. In hscript: opcf /obj/geo1 # parent path opadd file myFile # command to create the node In python: myNode = hou.node("/obj/geo1") # parent path myNode.createNode("file", "myFile") # command to create the node Cheers, Ron Hi Rony: Thank you for replying, Sorry I didn't explain it clearly, I'll explain with image, please see the attachment, hope you can understand what I was saying Thank you so much Edited July 2, 2012 by evilbear Quote Link to comment Share on other sites More sharing options...
graham Posted July 2, 2012 Share Posted July 2, 2012 You can do something like this in the callback field of the button. file_sop = hou.pwd().parent().createNode("file"); file_sop.parm("file").set(hou.pwd().parm("sopoutput")) Quote Link to comment Share on other sites More sharing options...
evilbear Posted July 3, 2012 Author Share Posted July 3, 2012 You can do something like this in the callback field of the button. file_sop = hou.pwd().parent().createNode("file"); file_sop.parm("file").set(hou.pwd().parm("sopoutput")) Hi Graham: Thank you so much. Quote Link to comment Share on other sites More sharing options...
Legniart Posted June 10, 2020 Share Posted June 10, 2020 On 7/3/2012 at 12:54 PM, evilbear said: Hi Graham: Thank you so much. sir, what if i want to load a specific file from specific file 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.