Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

[beta1] Blender Collection instances are not exported  #32

Description

@emanuelegissi

Currently Blender Collection instances are not exported to the FDS case.
This is rather easy to fix.

Here is a basic demo on how to append all object names in selection as well as the object names of the selected collection instances to one list and and count the items:

import bpy
C = bpy.context
objs = []
for ob in C.selected_objects:    
    if ob.instance_type == 'COLLECTION':
        for ob_col in ob.instance_collection.objects:
            objs.append(ob_col.name)
    else:
        objs.append(ob.name)
print ("{} objects in selection".format(len(objs)))

I am also wondering if collection.children_recursive gets Collection instances.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions