Jump to content

Parameter - force evaluate expression


Recommended Posts

If I have parameters on digital assets that are expressions I sometimes find it useful to have another parameter that shows the result of the expression. I can obviously middle mouse on a parameter to show the evaluated result but is there a way to show the evaluated result by default?

I feel like the answer is no so my solution would be to use callbacks for any parameter that affects the expression then update the 'result' parameter as a raw string, unless anyone has a better suggestion?

Link to comment
Share on other sites

I know, I was just hoping to be able to show a parameter in its 'result' state by default - without having to click on it first. Just in case I make an asset and another artist might not know you can toggle between the expression and the result of the expression 

Link to comment
Share on other sites

  • 2 years later...
On 24.3.2017 at 10:57 AM, michaelb-01 said:

If I have parameters on digital assets that are expressions I sometimes find it useful to have another parameter that shows the result of the expression. I can obviously middle mouse on a parameter to show the evaluated result but is there a way to show the evaluated result by default?

Having the same Question.

.

On 25.3.2017 at 2:08 PM, Atom said:

An expression field is always green to remind you that you can click to reveal what is driving the result.

Some how for string attributes this seems not to be the case.

Edited by Drughi
Link to comment
Share on other sites

  • 2 years later...

One small trick is to use a string parameter with a Python expression like this:

node = hou.node(".")
path = node.parm("myParm").eval()
return path

Where "myParm" is the name of the parameter containing the expression to evaluate.
Make sure the parm cointain the python code is set to "Python" in the Edit parm Interface options.

PS. Not sure what happened above but somehow the post got duplicated and cannot delete it anymore.
 

Screenshot 2022-03-01 160047.png

Edited by WLVL
typo
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...