exec ports for get/set variables

StephenTStephenT Fabric for MotionBuilder Posts: 77

Hi all,

I'm having a bit of trouble controlling the execution of my graphs when get/setting simulation variables.

I figured that my 'set' node is being pulled before my 'get' node (report-debugging suggests that).

So, I figure I can use the exec ports to explicitly chain dependencies, and force my 'set' node to be the last executed node in the graph.

However, the set var node doesn't appear to have an exec port? Or I can't see how to force it to connect. I'm getting around this by putting my 'set' in the middle of the evaluation, but I would much prefer to have it at the end.

Is this by design? Any suggestions on how I can force my variable 'sets' to only happen at the end of evaluation?

this does seem like it should be pretty straight-forward but I'm still having problems with this after quite a while of playing, so I figure I'll see how others deal with this.

Comments

  • Gustavo BoehsGustavo Boehs Posts: 63 ✭✭
    edited March 8

    Hello Stephen, I have also ran on this problem a few times now... What you can do is use a Merge Execute node. Like so:

    Port 'this' will execute first, port 'e0' will execute after everything in port 'this' has been executed. Also, it is interest to note that if you connect this merge node in the execution port of another node, it will execute the merge node first, and the node to which it is connected afterwards.

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    In general, you can connect an output of any type to the input of an Execute port, which I believe will allow to to bypass the limitation of missing exec ports on Set nodes. There is an open item to fix the actual problem, ie. to add exec ports to Set nodes.

    Peter Zion
    Fabric Engine

  • StephenTStephenT Fabric for MotionBuilder Posts: 77

    Hey Gustavo,

    That looks pretty interesting - I haven't seen merge nodes yet, but that looks like it will help a lot in order my dependencies. I have a nagging feeling that having to do this is not clean, but there's clean and there's works and I like works a lot more.

    Thanks for the info Peter. Chaining the values works fine (but the exec port would be nice too :). I kinda avoid chaining execs so far, especially for get/set variables, as the docs say an implicit exec port could be pulled multiple times, and I'm not sure what that would do to my caches etc. I think it'll get clearer how it works with familiarity, but I keep getting my dependencies wrong so I'm just avoiding that for the moment.

Sign In or Register to comment.