Fix #104467: Archimesh boolean doesn't work in 3.5 #104468
@ -11,7 +11,7 @@ bl_info = {
|
||||
"name": "Archimesh",
|
||||
"author": "Antonio Vazquez (antonioya)",
|
||||
"location": "View3D > Add Mesh / Sidebar > Create Tab",
|
||||
"version": (1, 2, 4),
|
||||
"version": (1, 2, 5),
|
||||
"blender": (3, 0, 0),
|
||||
"description": "Generate rooms, doors, windows, and other architecture objects",
|
||||
"doc_url": "{BLENDER_MANUAL_URL}/addons/add_mesh/archimesh.html",
|
||||
|
@ -108,8 +108,7 @@ class ARCHIMESH_OT_Hole(Operator):
|
||||
# ---------------------------------------
|
||||
for child in obj.parent.children:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
if child["archimesh.ctrl_hole"]:
|
||||
if "archimesh.ctrl_hole" in child and child["archimesh.ctrl_hole"]:
|
||||
# apply scale
|
||||
t = parentobj.RoomGenerator[0].wall_width
|
||||
if t > 0:
|
||||
@ -117,11 +116,8 @@ class ARCHIMESH_OT_Hole(Operator):
|
||||
else:
|
||||
child.scale.y = 1
|
||||
# add boolean modifier
|
||||
if isboolean(myroom, child) is False:
|
||||
if not isboolean(myroom, child):
|
||||
set_modifier_boolean(myroom, child)
|
||||
except:
|
||||
# print("Unexpected error:" + str(sys.exc_info()))
|
||||
pass
|
||||
|
||||
# ---------------------------------------
|
||||
# Now add the modifiers to baseboard
|
||||
|
@ -172,9 +172,7 @@ def set_modifier_solidify(myobject, width):
|
||||
# Add modifier (boolean)
|
||||
# --------------------------------------------------------------------
|
||||
def set_modifier_boolean(myobject, bolobject):
|
||||
bpy.context.view_layer.objects.active = myobject
|
||||
if bpy.context.view_layer.objects.active.name == myobject.name:
|
||||
boolean_modifier = context.object.modifiers.new("", 'BOOLEAN')
|
||||
boolean_modifier = myobject.modifiers.new("", 'BOOLEAN')
|
||||
boolean_modifier.operation = 'DIFFERENCE'
|
||||
boolean_modifier.object = bolobject
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user