Remove code to support Blender 2.79 and older

This commit is contained in:
2021-02-16 11:33:48 +01:00
parent 8b49c5505e
commit 14778e5c08
9 changed files with 65 additions and 459 deletions

View File

@@ -47,15 +47,11 @@ if "bpy" in locals():
pillar = importlib.reload(pillar)
async_loop = importlib.reload(async_loop)
blender = importlib.reload(blender)
compatibility = importlib.reload(compatibility)
else:
import bpy
if bpy.app.version < (2, 80):
from . import draw_27 as draw
else:
from . import draw
from .. import pillar, async_loop, blender, compatibility
from . import draw
from .. import pillar, async_loop, blender
import bpy
import pillarsdk
@@ -266,7 +262,7 @@ class ATTRACT_PT_tools(AttractPollMixin, Panel):
)
# Group more dangerous operations.
dangerous_sub = layout.split(**compatibility.factor(0.6), align=True)
dangerous_sub = layout.split(factor=0.6, align=True)
dangerous_sub.operator(
"attract.strip_unlink", text="Unlink %s" % noun, icon="PANEL_CLOSE"
)
@@ -433,12 +429,11 @@ class ATTRACT_OT_shot_fetch_update(AttractOperatorMixin, Operator):
return {"FINISHED"}
@compatibility.convert_properties
class ATTRACT_OT_shot_relink(AttractOperatorMixin, Operator):
bl_idname = "attract.shot_relink"
bl_label = "Relink With Attract"
strip_atc_object_id = bpy.props.StringProperty()
strip_atc_object_id: bpy.props.StringProperty()
@classmethod
def poll(cls, context):
@@ -505,13 +500,12 @@ class ATTRACT_OT_shot_open_in_browser(AttractOperatorMixin, Operator):
return {"FINISHED"}
@compatibility.convert_properties
class ATTRACT_OT_shot_delete(AttractOperatorMixin, Operator):
bl_idname = "attract.shot_delete"
bl_label = "Delete Shot"
bl_description = "Remove this shot from Attract"
confirm = bpy.props.BoolProperty(name="confirm")
confirm: bpy.props.BoolProperty(name="confirm")
@classmethod
def poll(cls, context):
@@ -971,13 +965,12 @@ class ATTRACT_OT_copy_id_to_clipboard(AttractOperatorMixin, Operator):
return {"FINISHED"}
@compatibility.convert_properties
class ATTRACT_OT_project_open_in_browser(Operator):
bl_idname = "attract.project_open_in_browser"
bl_label = "Open Project in Browser"
bl_description = "Opens a webbrowser to show the project in Attract"
project_id = bpy.props.StringProperty(name="Project ID", default="")
project_id: bpy.props.StringProperty(name="Project ID", default="")
def execute(self, context):
import webbrowser