Skip to content

Commit

Permalink
Update extension in collection export filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Jun 6, 2024
1 parent 040c743 commit 9959875
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons/io_scene_gltf2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ def ensure_filepath_matches_export_format(filepath, export_format):


def on_export_format_changed(self, context):

# Update the filename in collection export settings when the format (.glb/.gltf) changes
if isinstance(self.id_data, bpy.types.Collection):
self.filepath = ensure_filepath_matches_export_format(
self.filepath,
self.export_format,
)

# Update the filename in the file browser when the format (.glb/.gltf)
# changes
sfile = context.space_data
Expand Down

0 comments on commit 9959875

Please sign in to comment.