merlino Posted November 12, 2014 Share Posted November 12, 2014 Hey there, I think this is kind of simple for "Coders Corner" but ... it's a first time ... so: I want to open a window with a simple text like "Warning!" based on the sum of values I put in parameters I added to a node. More specifically I create 3 new parameters in a node, if the sum is more than 100 I need the warning window to pop up. I can create a message using python with hou.ui.displayMessage("Waring!") but I can't figure out how to read the others values. Any help? Thanks in advance! Marco Quote Link to comment Share on other sites More sharing options...
merlino Posted November 13, 2014 Author Share Posted November 13, 2014 Some step forward: I can evaluate the actual value of the new parameter putting this code on the callback script: if hou.node("/obj/subnet1").evalParm("parm") > 3: hou.ui.displayMessage("Hello!") But it works only when I actually change only that value manually, if I put an expression like ch("tx")+ch("ty") in that parm it doesn't works ... maybe tomorrow I'll be more lucky! Quote Link to comment Share on other sites More sharing options...
edward Posted November 13, 2014 Share Posted November 13, 2014 You really can't do things like that in Houdini where the evaluation engine is fundamentally functional. The only way to sort of do this is perhaps embed a Python SOP which will then evaluate the parameters and pop up a warning when evaluated. However, nothing will happen unless your Python SOP gets evaluated and it won't unless someone actually needs its data. Quote Link to comment Share on other sites More sharing options...
merlino Posted November 13, 2014 Author Share Posted November 13, 2014 Wow! Really interesting information! I'll try with the python SOP Thankyou Edward! Marco Quote Link to comment Share on other sites More sharing options...
merlino Posted November 13, 2014 Author Share Posted November 13, 2014 Done! Thankyou very much Edward, now it's working! Cheers! Marco 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.