blenderfds icon indicating copy to clipboard operation
blenderfds copied to clipboard

[beta1] Blender Collection instances are not exported

Open emanuelegissi opened this issue 3 years ago • 0 comments

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.

emanuelegissi avatar May 29 '22 06:05 emanuelegissi