1
$\begingroup$

I created a spline list following this guide. Now I want to assign a different color to each spline using Cycle's random node, but it doesn't work because the splines are grouped into one object.

My solution to this is to instance the spline object and loop through each instance, creating one object for each spline. This worked when I checked Deep Copy, but did not animate. I animated the start/end for each spline and need that to be carried over as well. If I do not check Deep Copy, it duplicates the same spline, stacked on top of itself.

What other way can I do this? Or can I assign random colors to splines using animation node?

Below is a screenshot of my entire node setup. enter image description here Also, in the screen shot you can see when viewed from the instance, each object has a list of 50 splines, but when viewed through the loop, there's only 1 spline. What's the reason to this?

I am using AN 2.1, python 3.7.

$\endgroup$

1 Answer 1

1
$\begingroup$

You should use the Object Instancer node to create a number of empty objects, this is done by disabling Copy From Source option. Then loop over both the objects and the splines and output the splines to the objects as follows:

Node Tree

$\endgroup$

You must log in to answer this question.

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