Juzwa Posted July 7, 2016 Share Posted July 7, 2016 Hi, So inside my otl there is a ROP Output Driver. I want my otl button to make press the save button on the ROP Output Driver. So I have this button: '/obj/MyOTL/save' And want to control this button: '/obj/MyOTL/rop_output_driver/execute' I've been trying for some time now but I just cant find the function to simply press a button Quote Link to comment Share on other sites More sharing options...
graham Posted July 7, 2016 Share Posted July 7, 2016 You can basically just set up a Python callback on your save button that does one of two things: - Calls hou.Parm.pressButton() on the execute parameter on your ROP node: hou.pwd().node("rop_output_driver").parm("execute").pressButton() - Calls hou.RopNode.render() on the ROP node itself: hou.pwd().node("rop_output_driver").render() Both are basically equivalent as the button is going to invoke the render method of the node Quote Link to comment Share on other sites More sharing options...
Juzwa Posted July 7, 2016 Author Share Posted July 7, 2016 Thank you! This clears some things for me Quote Link to comment Share on other sites More sharing options...
Juzwa Posted July 9, 2016 Author Share Posted July 9, 2016 Okay. So I have now two buttons in my OTL. Save and Force Load (this is just a reload in file SOP) Save Button: hou.pwd().node("save_constraints").parm("execute").pressButton() Force Load Button: hou.pwd().node("read_constraints").parm("reload").pressButton() Save button works perfectly all the time, no matter how many otls I have. But The load button... sometimes it work and sometimes not. Usually I have to dive into OTL, manually press reaload, and then the Force Button will start working. As long I'm using the same OTL. When I change the working OTL its the same story. Have to dive in, manually press reload... 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.