From 3f245515e15f9b3bd0ae42dafb4c4ab49d385d37 Mon Sep 17 00:00:00 2001 From: Julien Duroure Date: Wed, 4 Mar 2020 18:36:30 +0100 Subject: [PATCH] Fix #956 when settings are saved inside .blend file --- addons/io_scene_gltf2/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/io_scene_gltf2/__init__.py b/addons/io_scene_gltf2/__init__.py index e7548ae5c..2dcc31532 100644 --- a/addons/io_scene_gltf2/__init__.py +++ b/addons/io_scene_gltf2/__init__.py @@ -352,7 +352,13 @@ def invoke(self, context, event): if settings: try: for (k, v) in settings.items(): - setattr(self, k, v) + if k == "export_selected": # Back compatibility for export_selected --> use_selected + setattr(self, "use_selected", v) + del settings[k] + settings["use_selected"] = v + print("export_selected is now renamed use_selected, and will be deleted in a few release") + else: + setattr(self, k, v) self.will_save_settings = True except (AttributeError, TypeError):