Author Topic: Question about getting a function graph variable from a node  (Read 1117 times)

Hey everyone, I wonder if anyone can help clue me in on something here. I'm trying to set a variable in a function graph in one node and get said variable in another function graph on another node. Whenever I do this, the variable appears to not be set and returns 0. Even if I get the variable from the exact same function graph I set it in, it doesn't return the value I set.

Is there something I'm missing (scope?) or is it not possible to set and get variables like this? No idea if this is a bug or not so that's why I'm asking.

I'm hoping to avoid having to copy nodes across function graphs but I'll do it if I have to.

It's not possible to set/get variables in different nodes in the compositing graph.

Quote
Even if I get the variable from the exact same function graph I set it in, it doesn't return the value I set.

Make sure the "set" is evaluated before the "get". You'll probably have to use a "Sequence" node for that: the branch plugged to the first input is evaluated first.
Product Manager - Allegorithmic