From 26ee49da305d4221b9c41d287d61b014e66c7eb2 Mon Sep 17 00:00:00 2001 From: Simon Lusenc Date: Fri, 3 Jun 2022 18:18:57 +0200 Subject: [PATCH] Release 2.3 Final #2 --- addon/io_scs_tools/__init__.py | 2 +- addon/io_scs_tools/operators/wm.py | 12 +++++------- addon/io_scs_tools/properties/addon_preferences.py | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/addon/io_scs_tools/__init__.py b/addon/io_scs_tools/__init__.py index 7cd374c..2e3cb1d 100644 --- a/addon/io_scs_tools/__init__.py +++ b/addon/io_scs_tools/__init__.py @@ -22,7 +22,7 @@ "name": "SCS Tools", "description": "Setup models, Import-Export SCS data format", "author": "Simon Lusenc (50keda), Milos Zajic (4museman)", - "version": (2, 3, "76f322df"), + "version": (2, 3, "5277ea2d"), "blender": (3, 0, 0), "location": "File > Import-Export", "wiki_url": "http://modding.scssoft.com/wiki/Documentation/Tools/SCS_Blender_Tools", diff --git a/addon/io_scs_tools/operators/wm.py b/addon/io_scs_tools/operators/wm.py index 76531e7..6c67807 100644 --- a/addon/io_scs_tools/operators/wm.py +++ b/addon/io_scs_tools/operators/wm.py @@ -332,8 +332,8 @@ def modal(self, context, event): if SCS_TOOLS_OT_Show3DViewReport.__static_main_instance != self: return {'FINISHED'} - # if global abort was requested finish this modal operator instance - if SCS_TOOLS_OT_Show3DViewReport.__static_abort: + # only finish on global abort if there is no lines to display + if SCS_TOOLS_OT_Show3DViewReport.__static_abort and not SCS_TOOLS_OT_Show3DViewReport.has_lines(): return {'FINISHED'} # if operator doesn't have controls, then it can not be cancelled by user, @@ -431,13 +431,11 @@ def invoke(self, context, event): # if abort is requested just cancel operator if self.abort: + # when aborting progress message reset it's buffer and + # always return operator controls to none hidden state if self.is_progress_message: SCS_TOOLS_OT_Show3DViewReport.__static_progress_message_l.clear() - - if len(SCS_TOOLS_OT_Show3DViewReport.__static_message_l) > 0: - SCS_TOOLS_OT_Show3DViewReport.__static_hide_controls = False - else: - SCS_TOOLS_OT_Show3DViewReport.discard_drawing_data() + SCS_TOOLS_OT_Show3DViewReport.__static_hide_controls = False else: SCS_TOOLS_OT_Show3DViewReport.discard_drawing_data() diff --git a/addon/io_scs_tools/properties/addon_preferences.py b/addon/io_scs_tools/properties/addon_preferences.py index 003594f..2ee88dc 100644 --- a/addon/io_scs_tools/properties/addon_preferences.py +++ b/addon/io_scs_tools/properties/addon_preferences.py @@ -327,11 +327,11 @@ def get_writtable_keys(self): # SCS TOOLS - PROJECT RELATED GLOBAL PATHS def scs_project_path_update(self, context): - # ensure normalized for of project path, particularly removed end directory separator, + # ensure real project path as directory, particularly removed end directory separator, # otherwise textures might not be properly loaded from parent and parent sibling directories # (we assign property directly to prevent recursive property update calls) if self.scs_project_path: - self["scs_project_path"] = _path_utils.full_norm(self.scs_project_path) + self["scs_project_path"] = self.scs_project_path.rstrip("\\/") _config_container.update_scs_project_path(self.scs_project_path) return None