0
$\begingroup$

In comparrison with Unreal Blueprints i felt the need of Flow Controll in Animation Nodes, like gate. Is there another way then routing - for example - the transformation to an empty like in my example?

To compare Blueprints and AN is a bit off but i need the functionality to work with huge numbers of categorised objects. expl.: all chairs to height 1, all shelfes to height 2.

enter image description here

$\endgroup$
  • $\begingroup$ Can you elaborate on what you are trying to do? We are not all familiar with UE4 blueprints. $\endgroup$ – Omar Emara Mar 29 at 11:48
  • $\begingroup$ It works as in the example, but i dont like it aesthetically, so I though maby there is a better way I don’t know about. Im still learning AN. $\endgroup$ – A M Mar 29 at 12:51
  • $\begingroup$ Specifically I want nodes/node-branches only to be activated under certain conditions. Expl.: there is a list 500 objects with 3 categories: chair, desk, bed. They have random sizes, but I already have a list in wich category they are in (0 = chair, 1 = desk, 2 = bed). Now I want to scale all chairs to z-height 1, all desks to z-height 1,5 and all beds to z-height 0,5. $\endgroup$ – A M Mar 29 at 12:51
  • $\begingroup$ At the moment in my example all branches are executed but when the category-list entry doesn’t match the case-function then the transformation is applied to the empty and not the object. This works but I would like to only activate necessary branches and not all. $\endgroup$ – A M Mar 29 at 12:51
  • 1
    $\begingroup$ Please don't add answers as edits. You may add an answer to your own question and accept it after couple of days if you wish to. $\endgroup$ – Omar Emara Mar 29 at 13:46
1
$\begingroup$

Given the list of objects, their classes (0, 1, 2), and sizes of each class. We can evaluate the sizes list at the classes list and use the output as the scale as follows:

Node Tree

$\endgroup$
0
$\begingroup$

Omar Ahmad's answer is good for my specific problem and i learned something from it, thx! But i found another solution with a simple pythonscript to shorten the nodetree from the first example and solve the aesthetic problem, because the empty was redundant in the first place. now the functionality is more like a switch/case as in coding and not binary anymore.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.