Search - User list
Full Version: conditionals using ifbegin/ifend in APEX
Root » Rigging » conditionals using ifbegin/ifend in APEX
traileverse
How does conditional statements in APEX work using the ifbegin and ifend? there is no condition output on the ifbegin that would drive the logic and the ifend seems like it's just doing a passthrough of its inputs. How does it work?
patar
like this...
traileverse
patar
like this...
Thanks @patar, this part I got, but I now realize that if nothing is happening between the begin and end block it will just passthrough the data regardless of the result of the condition. My thought process was that I could feed through 2 inputs into the begin block, plug the begin output of those into the end block and then that would have one output that depends on the result of the condition lol.
edward
Maybe you're thinking of a TwoWaySwitch? For IfBegin/IfEnd blocks, the graph enclosed within them are only executed if the condition into the IfBegin is true.
patar
i guess make 2 if loops? one for true one for false
0chumpy
you have to add "not" node to do the else condition, i had headaches swapping variables inside if block, i ended up just creating a new block and "not" node to process those.
edward
Maybe what we're missing is an IfElse node? So for single If blocks, you would insert the IfElse node right before the IfEnd and then you put all the stuff you want when the condition is False in between the IfElse and IfEnd nodes. The only question with this approach is whether the values you use inside the else block need to be connected in from the IfBegin or not.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB