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

@@ -26,16 +26,11 @@ import bpy
import bgl
import pillarsdk
from .. import async_loop, compatibility, pillar, cache, blender, utils
from .. import async_loop, pillar, cache, blender, utils
from . import (
menu_item as menu_item_mod,
) # so that we can have menu items called 'menu_item'
from . import nodes
if bpy.app.version < (2, 80):
from . import draw_27 as draw
else:
from . import draw
from . import draw, nodes
REQUIRED_ROLES_FOR_TEXTURE_BROWSER = {"subscriber", "demo"}
MOUSE_SCROLL_PIXELS_PER_TICK = 50
@@ -686,7 +681,6 @@ class BlenderCloudBrowser(
self.scroll_offset_target = self.scroll_offset = 0
@compatibility.convert_properties
class PILLAR_OT_switch_hdri(
pillar.PillarOperatorMixin, async_loop.AsyncModalOperatorMixin, bpy.types.Operator
):
@@ -698,11 +692,11 @@ class PILLAR_OT_switch_hdri(
log = logging.getLogger("bpy.ops.%s" % bl_idname)
image_name = bpy.props.StringProperty(
image_name: bpy.props.StringProperty(
name="image_name", description="Name of the image block to replace"
)
file_uuid = bpy.props.StringProperty(
file_uuid: bpy.props.StringProperty(
name="file_uuid", description="File ID to download"
)
@@ -834,7 +828,7 @@ def _hdri_download_panel(self, current_image):
)
return
row = self.layout.row(align=True).split(**compatibility.factor(0.3))
row = self.layout.row(align=True).split(factor=0.3)
row.label(text="HDRi", icon_value=blender.icon("CLOUD"))
row.prop(current_image, "hdri_variation", text="")