Jump to content

Pop a warning window


merlino

Recommended Posts

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

Link to comment
Share on other sites

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! :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...