Skip to content

Commit

Permalink
Merge branch 'release-0.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
egtwobits committed Sep 3, 2020
2 parents b602f91 + 85a719b commit c6b39f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
2 changes: 1 addition & 1 deletion mesh_mesh_align_plus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
29 changes: 6 additions & 23 deletions mesh_mesh_align_plus/utils/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4730,36 +4730,19 @@ 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():
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
# TODO: Refactor from old deprecated 2.7x compatibility design
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
# TODO: Refactor from old deprecated 2.7x compatibility design
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):
Expand Down

0 comments on commit c6b39f4

Please sign in to comment.