Skip to content

Commit

Permalink
Fix KhronosGroup#1921 - saved setting filter file type
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed May 18, 2023
1 parent b14452d commit 87be2a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/io_scene_gltf2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def on_export_format_changed(self, context):

# Also change the filter
sfile.params.filter_glob = '*.glb' if self.export_format == 'GLB' else '*.gltf'
# Force update of file list, has update the filter does not update the real file list
# Force update of file list, because update the filter does not update the real file list
bpy.ops.file.refresh()


Expand Down Expand Up @@ -640,6 +640,10 @@ def invoke(self, context, event):
setattr(self, k, v)
self.will_save_settings = True

# Update filter if user saved settings
if hasattr(self, 'export_format'):
self.filter_glob = '*.glb' if self.export_format == 'GLB' else '*.gltf'

except (AttributeError, TypeError):
self.report({"ERROR"}, "Loading export settings failed. Removed corrupted settings")
del context.scene[self.scene_key]
Expand Down

0 comments on commit 87be2a3

Please sign in to comment.