soham Posted November 24, 2011 Share Posted November 24, 2011 Hi Guys I want to create a button on a DA user interface which saves/exports the geometry as a .bgeo on click. I am guessing this should be possible with the File node in Write mode but coudnt figure it out.. Any help regarding this is appreciated. Many Thanks Quote Link to comment Share on other sites More sharing options...
Annon Posted November 24, 2011 Share Posted November 24, 2011 You want the ROP output Driver. Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 24, 2011 Share Posted November 24, 2011 (edited) and put callback hscript on your DA button: opparm -c /path/to/ROPoutputdriver execute or python: hou.node('/path/to/ROPoutputdriver').parm('execute').pressButton() Edited November 24, 2011 by tmdag Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted November 24, 2011 Share Posted November 24, 2011 It's easier to just promote the Render button to the assets interface, and rename it to "Save". That's what I usually do. Quote Link to comment Share on other sites More sharing options...
soham Posted November 24, 2011 Author Share Posted November 24, 2011 Thanks a lot guys.. it really helped.. One more question.. How to make it create a new file every time the button is clicked and not overwrite the existing file.. (and not having to change the name manually) Many Thanks Quote Link to comment Share on other sites More sharing options...
3dbeing Posted November 24, 2011 Share Posted November 24, 2011 (edited) How to make it create a new file every time the button is clicked and not overwrite the existing file.. (and not having to change the name manually) Many Thanks add another spare channel, reference that in your file name; in your render button put this in the callback script opparm `opfullpath(".")` parm (`ch(parm)+1`) where parm is the name of the ref'd parm name and no you don't need quotes when refing a channel in the same node, at least in hscript... Edited November 24, 2011 by 3dbeing Quote Link to comment Share on other sites More sharing options...
soham Posted December 2, 2011 Author Share Posted December 2, 2011 Added a new integer parameter and referenced to it in the button using the above script and it worked.. i hope thats what you had intended to mean... Thanks a lot for the help Guys 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.