FBX: Enable the Collection exporter feature #105273

Merged
Jesse Yurkovich merged 6 commits from deadpin/blender-addons:fbx-collectionexport into main 2024-04-16 05:13:36 +02:00
Showing only changes of commit 7dc9a38448 - Show all commits

View File

@ -3612,8 +3612,9 @@ def save(operator, context,
if use_active_collection: if use_active_collection:
source_collection = context.view_layer.active_layer_collection.collection source_collection = context.view_layer.active_layer_collection.collection
elif collection: elif collection:
if collection in bpy.data.collections: local_collection = bpy.data.collections.get((collection, None))
source_collection = bpy.data.collections[collection] if local_collection:
source_collection = local_collection
else: else:
operator.report({'ERROR'}, "Collection '%s' was not found" % collection) operator.report({'ERROR'}, "Collection '%s' was not found" % collection)
return {'CANCELLED'} return {'CANCELLED'}