0
$\begingroup$

node setup

node setup error

I am playing around with animation nodes, so I have a bunch of instances along a spline. As you see in the working node tree, instances 31.00 and a Math node socket B also set as 31.00.

So now you think, OK I'll drive the math value by the number of instances, which would be the same float number. Wrong! If you do this everything goes RED and the whole world is destroyed!!!

Why can I not connect these two nodes?

$\endgroup$
5
  • $\begingroup$ does it help you when you look into the problems panel on the left? the problem is not the datatype but that you connect two different networks which cannot be merged. $\endgroup$ Jun 13, 2016 at 18:26
  • $\begingroup$ Ah yes of course now i understand. I correct to new parameter in my loop subprogram and now it works. $\endgroup$
    – Neil
    Jun 13, 2016 at 18:34
  • $\begingroup$ perfect, would you like to write a full answer for your question yourself? $\endgroup$ Jun 13, 2016 at 19:46
  • $\begingroup$ Maybe you should not allow connections of this type rather than just making everything go red and leaving it connected? $\endgroup$
    – Neil
    Jun 16, 2016 at 8:08
  • $\begingroup$ I prefer the way it is now because it's better to show an error message instead of just not allowing you to make this links (I'm not even able to forbid this with python!). It also helps to grasp the concept of networks in AN earlier. One thing I want to change is that you are told to look into the problems panel directly in Blender. $\endgroup$ Jun 16, 2016 at 8:29

1 Answer 1

1
$\begingroup$

As pointed out by Jacques, in the problems panel we can see what has caused this issue. I highlighted this in red.

problems panel

What I needed to do was to use another socket on the subprogram and loop input nodes, I have also highlighted these in red on the node tree.

node tree

Finally here is what the node tree produces, nothing spectacular but at least I'm learning how to use the amazing Animation Nodes addon.

animation

$\endgroup$
2
  • $\begingroup$ one quick tip: you don't have to pass the length of the lists you iterate over separately. You can also just use the "Iterations" socket in the Loop Input node. It should give you the same effect in your animation. $\endgroup$ Jun 13, 2016 at 21:02
  • $\begingroup$ Thank you, this saves me passing values through. I will pick these things up over time. $\endgroup$
    – Neil
    Jun 13, 2016 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .