Skip to content

Commit

Permalink
fix(exporter): implement unused keep_collections_as_transformgroups p…
Browse files Browse the repository at this point in the history
…roperty (StjerneIdioten#256)
  • Loading branch information
NMC-TBone authored Jan 14, 2025
1 parent c8f42bf commit c2e2461
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/i3dio/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ def _add_object_to_i3d(i3d: I3D, obj: BlenderObject, parent: SceneGraphNode = No
# Collections are checked first since these are always exported in some form
if isinstance(obj, bpy.types.Collection):
logger.debug(f"[{obj.name}] is a 'Collection'")
node = i3d.add_transformgroup_node(obj, _parent)
node = None
if i3d.settings['keep_collections_as_transformgroups']:
node = i3d.add_transformgroup_node(obj, _parent)
else:
i3d.logger.info(f"[{obj.name}] will be be ignored and its children will be added to nearest parent")
_process_collection_objects(i3d, obj, node)
return # Early return because collections are special
else:
Expand Down

0 comments on commit c2e2461

Please sign in to comment.