mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 23:20:56 +00:00
Fix error when filling opening with None object
This commit is contained in:
@@ -118,8 +118,10 @@ class AddFilling(bpy.types.Operator):
|
|||||||
return IfcStore.execute_ifc_operator(self, context)
|
return IfcStore.execute_ifc_operator(self, context)
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
obj = bpy.data.objects.get(self.obj) if self.obj else context.active_object
|
obj = context.scene.objects.get(self.obj, context.active_object)
|
||||||
opening = bpy.data.objects.get(self.opening) if self.opening else context.scene.VoidProperties.desired_opening
|
opening = context.scene.objects.get(self.opening, context.scene.VoidProperties.desired_opening)
|
||||||
|
if opening is None:
|
||||||
|
return {'FINISHED'}
|
||||||
self.file = IfcStore.get_file()
|
self.file = IfcStore.get_file()
|
||||||
element_id = obj.BIMObjectProperties.ifc_definition_id
|
element_id = obj.BIMObjectProperties.ifc_definition_id
|
||||||
ifcopenshell.api.run(
|
ifcopenshell.api.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user