mProv Posted May 26, 2022 Share Posted May 26, 2022 Hi, I'd need to customize the behaviour of the default buttons of some nodes, e.g. - display a custom message when I press "Save to Disk" on a rop_alembic. Also, I want the script to run for all the users in my studio. Maybe should I create a preset from this and save it in the shared HOUDINI_PATH? Beyond the fact I'm not sure how to do it on a custom buttom I may create in the parameter interface, all the default parameters are locked. Can someone help me? thanks Quote Link to comment Share on other sites More sharing options...
Benyee Posted May 27, 2022 Share Posted May 27, 2022 it seems you have to edit built-in otl to achieve the function,i'm not sure it's safe for houdini built-in nodes,so not recommended, but you can custom buttons or otls, here are basic steps for custom otl, 1) create a .py file in $HOUDINI_USER_PREF_DIR/pythonX.7libs, code it like this: import hou def onButtonPress(): #print("you pressed the button") hou.ui.displayMessage("hello,button pressed") 2) create arbitrary otl,add a button parameter 3) edit otl contents: edit operator type properties->scripts->event handler "python module" add codes like this, def press(): import button_press button_press.onButtonPress() then,on parameters tab set "callback script" to "hou.phm().press()", done. and you can ref these sections, callback Modules on disk Quote Link to comment Share on other sites More sharing options...
mProv Posted May 30, 2022 Author Share Posted May 30, 2022 Hi Benyee, thank you for the reply. Well actually my problem is in fact that people is not using the custom HDA and pipeline tool, that's why I'd like to edit the built-in stuff. For some ROPs I was thinking about using the pre-render script, and then block the parameter in order to prevent anyone to edit it again. But obviously if there is any better idea I'm happy to hear it. I really don't know how to handle flipbook tho... Basically I want people to use them just to see stuff on the fly, but if they want to save out images on the server they have to use the pipeline tool. Unfortunately everyone is basically ignoring it and saving out the image sequences by hand, resulting in wrong paths, names... 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.