From b1226da66a49a524ee17053c8f43d356597b18f4 Mon Sep 17 00:00:00 2001 From: stephen-l Date: Sat, 25 Sep 2021 12:03:10 +0200 Subject: Blender 3.0 compatibility --- archipack/__init__.py | 4 ++-- archipack/archipack_autoboolean.py | 6 ------ archipack/archipack_material.py | 2 +- archipack/archipack_preset.py | 4 ++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/archipack/__init__.py b/archipack/__init__.py index 0474cbd1..44c56b7c 100644 --- a/archipack/__init__.py +++ b/archipack/__init__.py @@ -31,8 +31,8 @@ bl_info = { 'author': 's-leger', 'license': 'GPL', 'deps': '', - 'version': (1, 2, 84), - 'blender': (2, 90, 0), + 'version': (1, 2, 85), + 'blender': (3, 0, 0), 'location': 'View3D > Sidebar > Create > Archipack', 'warning': '', 'doc_url': 'https://github.com/s-leger/archipack/wiki', diff --git a/archipack/archipack_autoboolean.py b/archipack/archipack_autoboolean.py index f5b6eaf4..3a424728 100644 --- a/archipack/archipack_autoboolean.py +++ b/archipack/archipack_autoboolean.py @@ -108,12 +108,6 @@ class ArchipackBoolManager(ArchipackCollectionManager): hole.hide_render = True hole.hide_select = True hole.select_set(state=True) - hole.cycles_visibility.camera = False - hole.cycles_visibility.diffuse = False - hole.cycles_visibility.glossy = False - hole.cycles_visibility.shadow = False - hole.cycles_visibility.scatter = False - hole.cycles_visibility.transmission = False def get_child_hole(self, o): for hole in o.children: diff --git a/archipack/archipack_material.py b/archipack/archipack_material.py index e363f304..5ac29d99 100644 --- a/archipack/archipack_material.py +++ b/archipack/archipack_material.py @@ -83,7 +83,7 @@ class MatLib(): """ try: # print("MatLib.load_mat(%s) linked:%s" % (name, link)) - with bpy.data.libraries.load(self.path, link, False) as (data_from, data_to): + with bpy.data.libraries.load(self.path, link=link, relative=False) as (data_from, data_to): data_to.materials = [name] except: pass diff --git a/archipack/archipack_preset.py b/archipack/archipack_preset.py index fe4b9307..65ca7245 100644 --- a/archipack/archipack_preset.py +++ b/archipack/archipack_preset.py @@ -34,8 +34,8 @@ from .archipack_gl import ( ThumbHandle, Screen, GlRect, GlPolyline, GlPolygon, GlText, GlHandle ) -preset_paths = bpy.utils.script_paths(subdir="presets") -addons_paths = bpy.utils.script_paths(subdir="addons") +preset_paths = [os.path.join(path, "presets") for path in bpy.utils.script_paths()] +addons_paths = [os.path.join(path, "addons") for path in bpy.utils.script_paths()] class CruxHandle(GlHandle): -- cgit v1.2.3