skip evaluation of an expression

   4281   4   2
User Avatar
Member
382 posts
Joined: July 2005
Offline
Does every expression in every parameter of a network
inside an hda always evaluate? I have custom expr dso
in a file sop that always prints out to the shell when it
can't find a file. I'd like to suppress this.. but nothing
seems to work. i tried using switch sops, thinking that
the node wont cook unless its in the cook path, but it
appears that the file sop expression is evaluated prior
to the network being cooked and makes no difference.

i also tried using `ifs(ch(“../skip”,cusom_expr(“asfd”),'')`
thinking the argument might not be evaluated unless
its needed.

i even tried to bypass all the nodes, (which isnt an option
in an hda) but the expressions are still evaluated….

Is my only resort to modify the output in the custom
expression dso itself???
User Avatar
Member
382 posts
Joined: July 2005
Offline
switch sops do work to bypass cook path and therefore node expression evaluation from a top level hda parameter…however i'm trying to evaluate
a radio tab value and switch on that… which doesnt seem to have the same effect in the network so far as i can tell…
User Avatar
Member
321 posts
Joined: July 2005
Offline
sdugaro
Does every expression in every parameter of a network
inside an hda always evaluate? I have custom expr dso
in a file sop that always prints out to the shell when it
can't find a file. I'd like to suppress this.. but nothing
seems to work. i tried using switch sops, thinking that
the node wont cook unless its in the cook path, but it
appears that the file sop expression is evaluated prior
to the network being cooked and makes no difference.

That seems a little odd. Have you tried the performance monitor to see what's in the cook chain? It might be that something unexpected is referencing your file sop. Does an hscript expression function behave the same way?
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
8102 posts
Joined: July 2005
Offline
Expressions will only be evaluated when some part of the Houdini UI requires it. Some examples:
- Looking at the parameter containing the expression in the Parameter pane
- Cooking something that requires the result of the expression
User Avatar
Member
382 posts
Joined: July 2005
Offline
thanks fellas! I noticed that the evaluation of the expressions
looked to be tied to where the display/render flags were set
even though the performance monitor showed that the actual
cooking was being bypassed via the switch nodes.

The hda took an input sop and branched off one way for a render,
and another way that employed file in nodes to read the data back
in for display. A final null node on the display branch had both the
display and render flags set. When a top level hda button was clicked
to invoke a render in a contained ropnet with the render hscript
command, the fact that the render flag was set on the display branch caused the expressions in that branch to evaluate even though they
were not needed/cooked.

Moving the render flag to the actual node being referenced for
the render looked to avoid cooking expressions in nodes that
were not needed when the render command was invoked.
  • Quick Links