gemini Posted September 12, 2018 Share Posted September 12, 2018 Hi, Can We create or modify a callback script of an existing button ? Thx, G Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted September 15, 2018 Share Posted September 15, 2018 Take a look at hou.ParmTemplate.setTags() method. Quote Link to comment Share on other sites More sharing options...
gemini Posted September 16, 2018 Author Share Posted September 16, 2018 Thanks, I can see the data (script) stored on parm , but sadly I could not figure out how to set the callback to other than what is stored. I tried: t.setTags({"script_callback":"print 222"}) But not worked. G Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted September 17, 2018 Share Posted September 17, 2018 Right, here is a working solution: n = hou.node('/obj/geo1') ptg = n.parmTemplateGroup() pt = ptg.find('myParm') pt.setScriptCallback('print 123') pt.setScriptCallbackLanguage(hou.scriptLanguage.Python) ptg.replace('myParm', pt) n.setParmTemplateGroup(ptg) 1 Quote Link to comment Share on other sites More sharing options...
gemini Posted September 18, 2018 Author Share Posted September 18, 2018 Works! ThankU! G 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.