1
$\begingroup$

I need to to make an object list and a material list from 100 existing objects. Making the object list is simple, I just box-select the objects and in animation node I use the "From Selection" option from the "create Object List" node.

Unfortunately, there is no such option for materials list. Is there I way I can automate creating a materials list from an object list? I have tried the "expression" node, but was not able to extract the materials list, due to my limited knowledge of python.

Thanks in advance for your help.

Sincerely,

Patrice

$\endgroup$
1
$\begingroup$

Welcome to StackExchange. You can easily get the material of the object with Expression Node by using Obj.material_slots[Index].material. Here I have made AN-Material of Object group-node which allows getting material of any object: enter image description here

For Object List, you can use Loop Node and AN-Material of Object to the materials of objects in the object-list: enter image description here

Blend File:

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ It works and it does exactly what I needed it to do. Thank you so much for your precious help. $\endgroup$ – Patrice Guy Nov 10 '19 at 9:30

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.