Adding openings now detects if you've selected the filling object instead

This commit is contained in:
Dion Moult
2020-09-09 23:20:29 +10:00
parent 681083e757
commit 38765c8f0e
@@ -3601,7 +3601,10 @@ class AddOpening(bpy.types.Operator):
bl_label = 'Add Opening'
def execute(self, context):
opening = context.active_object
if context.active_object.children and 'IfcOpeningElement/' in context.active_object.children[0].name:
opening = context.active_object.children[0]
else:
opening = context.active_object
if context.selected_objects[0] != context.active_object:
obj = context.selected_objects[0]
else: