Skip to content

Commit

Permalink
Collection Exporter: set collection custom prop as glTF scene extras
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Jan 23, 2025
1 parent 4b200cc commit 50e5619
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/io_scene_gltf2/blender/exp/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,9 @@ def __gather_scene(blender_scene, export_settings):

def __gather_extras(blender_object, export_settings):
if export_settings['gltf_extras']:
# If case of collection export, use custom properties of the collection instead of the scene
# So Collection custom properties are exported as glTF Scene extras
if export_settings['gltf_collection']:
return generate_extras(bpy.data.collections[export_settings['gltf_collection']])
return generate_extras(blender_object)
return None

0 comments on commit 50e5619

Please sign in to comment.