From 2586b2cd4785a06a1fc1a86e735418933399bb46 Mon Sep 17 00:00:00 2001 From: Eric Gentry Date: Thu, 6 Aug 2020 18:30:11 -0400 Subject: [PATCH 1/3] Removed deprecated/broken 2.7x compatibility check. --- mesh_mesh_align_plus/__init__.py | 2 +- mesh_mesh_align_plus/utils/geom.py | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/mesh_mesh_align_plus/__init__.py b/mesh_mesh_align_plus/__init__.py index 364a951..9095fd8 100644 --- a/mesh_mesh_align_plus/__init__.py +++ b/mesh_mesh_align_plus/__init__.py @@ -33,7 +33,7 @@ "based on geometry and measurements from your scene." ), "author": "Eric Gentry", - "version": (0, 6, 0), + "version": (0, 6, 1), "blender": (2, 80, 0), "location": ( "3D View > N Panel > Mesh Align Plus tab, and" diff --git a/mesh_mesh_align_plus/utils/geom.py b/mesh_mesh_align_plus/utils/geom.py index 97d1dbe..6808baf 100644 --- a/mesh_mesh_align_plus/utils/geom.py +++ b/mesh_mesh_align_plus/utils/geom.py @@ -4730,36 +4730,27 @@ def execute(self, context): return {'FINISHED'} -# TODO: Remove, 2.7x/2.8x cross compatibility no longer supported -# Blender 2.8 API compatibility var -if str(bpy.app.version[1]).startswith('8'): - BLENDER_28_PY_API = True -else: - BLENDER_28_PY_API = False +# # TODO: Remove, 2.7x/2.8x cross compatibility no longer supported +# # Blender 2.8 API compatibility var +# if str(bpy.app.version[1]).startswith('8'): +# BLENDER_28_PY_API = True +# else: +# BLENDER_28_PY_API = False # Blender 2.8 API compatibility func def get_active_object(): - if BLENDER_28_PY_API: - return bpy.context.view_layer.objects.active - else: - return bpy.context.active_object + return bpy.context.view_layer.objects.active # Blender 2.8 API compatibility func def get_select_state(item): - if BLENDER_28_PY_API: - return item.select_get() - else: - return item.select + return item.select_get() # Blender 2.8 API compatibility func def set_select_state(state, item): - if BLENDER_28_PY_API: - item.select_set(state) - else: - item.select = state + item.select_set(state) class MAPLUS_OT_ShowHideQuickGeomBaseClass(bpy.types.Operator): From b65717f39d06021bf46ab17a3c412f167168d984 Mon Sep 17 00:00:00 2001 From: Eric Gentry Date: Thu, 6 Aug 2020 18:33:14 -0400 Subject: [PATCH 2/3] Refactor from deprecated compatibility design. --- mesh_mesh_align_plus/utils/geom.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/mesh_mesh_align_plus/utils/geom.py b/mesh_mesh_align_plus/utils/geom.py index 6808baf..aa85847 100644 --- a/mesh_mesh_align_plus/utils/geom.py +++ b/mesh_mesh_align_plus/utils/geom.py @@ -4730,25 +4730,17 @@ def execute(self, context): return {'FINISHED'} -# # TODO: Remove, 2.7x/2.8x cross compatibility no longer supported -# # Blender 2.8 API compatibility var -# if str(bpy.app.version[1]).startswith('8'): -# BLENDER_28_PY_API = True -# else: -# BLENDER_28_PY_API = False - - -# Blender 2.8 API compatibility func +# TODO: Refactor from old deprecated 2.7x compatibility design def get_active_object(): return bpy.context.view_layer.objects.active -# Blender 2.8 API compatibility func +# TODO: Refactor from old deprecated 2.7x compatibility design def get_select_state(item): return item.select_get() -# Blender 2.8 API compatibility func +# TODO: Refactor from old deprecated 2.7x compatibility design def set_select_state(state, item): item.select_set(state) From 85a719b40316893ac8f1b56c416ee7645eca67ef Mon Sep 17 00:00:00 2001 From: Eric Gentry Date: Thu, 3 Sep 2020 19:44:11 -0400 Subject: [PATCH 3/3] Preparing for v0.6.1 release.