diff options
author | Stephen Leger <stephen@3dservices.ch> | 2019-04-07 11:13:42 +0300 |
---|---|---|
committer | Stephen Leger <stephen@3dservices.ch> | 2019-04-07 11:13:42 +0300 |
commit | a68c4204ac5e7345bf42eb0435356ee8fe48eae0 (patch) | |
tree | fbafab3a3bce738bba12e0fb3bfbd37d93e26242 | |
parent | 71846207f1e6fcff541558ebcb69323fc8885df2 (diff) |
archipack 2.8 move to UI panel, fix auto-boolean in draw tools
-rw-r--r-- | archipack/__init__.py | 6 | ||||
-rw-r--r-- | archipack/archipack_autoboolean.py | 2 | ||||
-rw-r--r-- | archipack/archipack_door.py | 1 | ||||
-rw-r--r-- | archipack/archipack_window.py | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/archipack/__init__.py b/archipack/__init__.py index 705468b7..e8ec83a6 100644 --- a/archipack/__init__.py +++ b/archipack/__init__.py @@ -31,7 +31,7 @@ bl_info = { 'author': 's-leger', 'license': 'GPL', 'deps': '', - 'version': (1, 2, 81), + 'version': (1, 2, 82), 'blender': (2, 80, 0), 'location': 'View3D > Tools > Create > Archipack', 'warning': '', @@ -308,8 +308,8 @@ class TOOLS_PT_Archipack_Create(Panel): bl_label = "Archipack" bl_idname = "TOOLS_PT_Archipack_Create" bl_space_type = "VIEW_3D" - bl_region_type = "TOOLS" - # bl_category = "Create" + bl_region_type = "UI" + bl_category = "Create" bl_context = "objectmode" @classmethod diff --git a/archipack/archipack_autoboolean.py b/archipack/archipack_autoboolean.py index 7d8a90a6..f5b6eaf4 100644 --- a/archipack/archipack_autoboolean.py +++ b/archipack/archipack_autoboolean.py @@ -554,7 +554,7 @@ class ARCHIPACK_OT_single_boolean(Operator): @classmethod def poll(cls, context): w = context.active_object - return (w.data is not None and + return (w is not None and w.data is not None and ("archipack_wall2" in w.data or "archipack_wall" in w.data or "archipack_roof" in w.data) and diff --git a/archipack/archipack_door.py b/archipack/archipack_door.py index 98ca1068..4d8b61ca 100644 --- a/archipack/archipack_door.py +++ b/archipack/archipack_door.py @@ -1749,6 +1749,7 @@ class ARCHIPACK_OT_door_draw(ArchipackDrawTool, Operator): if event.type in {'LEFTMOUSE', 'RET', 'NUMPAD_ENTER', 'SPACE'}: if wall is not None: + o.select_set(state=True) context.view_layer.objects.active = wall wall.select_set(state=True) if bpy.ops.archipack.single_boolean.poll(): diff --git a/archipack/archipack_window.py b/archipack/archipack_window.py index 7788eafe..f9bb4903 100644 --- a/archipack/archipack_window.py +++ b/archipack/archipack_window.py @@ -1939,10 +1939,12 @@ class ARCHIPACK_OT_window_draw(ArchipackDrawTool, Operator): if event.type in {'LEFTMOUSE', 'RET', 'NUMPAD_ENTER', 'SPACE'}: if wall is not None: + o.select_set(state=True) context.view_layer.objects.active = wall wall.select_set(state=True) if bpy.ops.archipack.single_boolean.poll(): bpy.ops.archipack.single_boolean() + wall.select_set(state=False) # o must be a window here if d is not None: |