archipack 2.8 move to UI panel, fix auto-boolean in draw tools
This commit is contained in:
parent
71846207f1
commit
a68c4204ac
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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():
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue