Manually force expression to update?


Is there a way, to force an expression to update/evaluate? … I do not want the -ae flag on (so that it evaluates every frame) …

I’m looking to see if there is a command or possible way to just manually tell it to evaluate upon command or when something is triggered.

I’ve looked into the scriptJob command to do a ‘dgdirty -a <object>’ … which tends to work … but in this case, it gets stuck in and endless cycle and doesn’t seem to stop…

I tried doing a “expression -e <expression_name>” … but … doesn’t seem to force it to update …




nevermind… problem solved.

wrote 2 return array functions and 1 process function.

I supply a wildcard string to my first return function which then finds all of the expressions in the scene with said wildcard.

I then supply that return array to my second function which acquires the actual string of EACH expression …

my process function then takes all those array strings and just re-evaluates them.

This only works because i’m not explicitly forcing things in my expressions. I have over 100 expressions all for various things, ie (30+ different light names) … everything is named according … so if i needed all the expressions for like “sky_lights” … to update … and they were named “sky_lights_#” … etc … then i could force an update when I want … of ONLY … those expressions …



i found if i make an expression, evaluating “on demand”, it can be evaluated by “getAttr expression1.evaluateNow;” command :))


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.