mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 07:49:59 +00:00
Fix bug to prevent users from appending a project library asset twice
This commit is contained in:
@@ -153,7 +153,7 @@ class IfcImporter:
|
||||
self.settings_native.set(self.settings_native.INCLUDE_CURVES, True)
|
||||
self.settings_2d = ifcopenshell.geom.settings()
|
||||
self.settings_2d.set(self.settings_2d.INCLUDE_CURVES, True)
|
||||
self.filter_mode = "BLACKLIST"
|
||||
self.filter_mode = None
|
||||
self.include_elements = set()
|
||||
self.exclude_elements = set()
|
||||
self.project = None
|
||||
|
||||
@@ -326,6 +326,8 @@ class AppendLibraryElement(bpy.types.Operator):
|
||||
library=IfcStore.library_file,
|
||||
element=IfcStore.library_file.by_id(self.definition),
|
||||
)
|
||||
if not element:
|
||||
return {"FINISHED"}
|
||||
self.import_type_from_ifc(element, context)
|
||||
blenderbim.bim.handler.purge_module_data()
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user