0
$\begingroup$

Considering this limitation of AN here I'm trying to create one object for each mesh generated with AN, but as show in the link, the object instancer won't help. I also tried expressions and custom script but an error pops up saying that animation nodes data structures aren't accepted as arguments.

Is there any other approach?

EDIT

Ok, after reading the answers and checking the comments I'm going to try to be more specific. Bare in mind that this question comes from a bigger Graph of nodes therefore it may be difficult to explain clearly why some decisions have been taken.

So, for a list of objects I generate a list vectors for each object (which are the result of an operation that calculates the number of points inside a volume and that belong to another list of splines), with this list of vectors I generate a mesh composed of one triangle for each vector. Now, each of the elements in this list of meshes needs to be linked to a different object.

The problem with @Omar Ahmad solution is that he is feeding to the loop a list of objects but in my case as I'm already inside the loop for the mesh generator I cannot place an object instancer. Here is that part of the graph:enter image description here

May be I just need to create a list of the generated meshes and put them out of the loop in order to use the instancer but I'm not sure how it will index it and if it will be in sync with object indexes.

I'm uploading the .blend if it helps.

$\endgroup$
1
  • $\begingroup$ I have seen similar issues with Blender Animation Nodes (BAN). Can you describe more fully what you are trying to do? The link your provided is not an interesting read and is 2015, perhaps relevant. Please show some of your work. $\endgroup$ Oct 22, 2018 at 20:07

2 Answers 2

3
$\begingroup$

Use the Object Instancer node to create n empty objects where n is the number of meshes you have. Then loop over both meshes and the empty objects and write each mesh to each empty object using the Mesh Object Output node. For example:

Node Tree

Notice how each mesh is its own object.

$\endgroup$
2
  • $\begingroup$ Ok the solution was actually very simple, As I thought passing the mesh list out of the loop and applying @Omar Ahmad proposal did the job. What if I wanted to name each object from the Object Instancer with a specific name? When I try to edit the attribute name the Object Instancer keep creating duplicates $\endgroup$ Oct 23, 2018 at 19:54
  • $\begingroup$ @JuanManuelLynch If you change their name, Animation Nodes won't be able to keep track of them. If you want total control, add the objects to a group, unlink them from the Instancer Node from the advanced node settings and replace the instancer node with an Objects From Group node. $\endgroup$
    – Omar Emara
    Oct 24, 2018 at 16:50
1
$\begingroup$

Consider creating objects without Blender Animation Nodes BAN and using them as needed.

Python can create objects and you have the manual options. Visibility can be managed with or without BAN. Use all your options. Python has a large body of people working to make in complete and exists prior to BAN. BAN depends on Python.

You have not written any of your specific needs. The reader of your question does not know how many objects are failed by BAN so it is difficult to talk about efficiency.

$\endgroup$

You must log in to answer this question.

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