0
$\begingroup$

Im really struggling with what seems to be an easy task, however Im not able to make this work.

I need to get the parent inside of a collection that's already in a collection,

with the code im using

    print(collection)
    if collection.name == doorname:
        door = collection.children[0]
        print(door) //OUTPUT: <bpy_struct, Collection("Door") at 0x7ff8f180b678>
        for objects in door:
            print(objects) //Error 

I want all the objects in the Door collection to be printed. Is there a way to do this, what am I missing?

Thanks in advance!

$\endgroup$
2
0
$\begingroup$

Maybe for objects in door.children since you're parenting them?

enter image description here

Yeah it could be cool to use magic method looping over children

$\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.