Remove appending occurrences from library in favor of fcaac6b

This commit is contained in:
Andrej730
2024-03-20 11:22:53 +05:00
parent d49faf7412
commit 97cc19ed43
3 changed files with 1 additions and 14 deletions
@@ -188,8 +188,6 @@ class RefreshLibrary(bpy.types.Operator):
types = IfcStore.library_file.wrapped_data.types_with_super()
element_classes = ["IfcTypeProduct", "IfcMaterial", "IfcCostSchedule", "IfcProfileDef"]
if self.props.library_display_elements:
element_classes += ["IfcElement"]
for importable_type in sorted(element_classes):
if importable_type in types:
new = self.props.library_elements.add()
@@ -438,6 +436,7 @@ class AppendLibraryElement(bpy.types.Operator):
if element.is_a("IfcTypeProduct"):
self.import_type_from_ifc(element, context)
elif element.is_a("IfcProduct"):
# NOTE: not used as UI doesn't allow appending non-types
self.import_product_from_ifc(element, context)
element_type = ifcopenshell.util.element.get_type(element)
obj = tool.Ifc.get_object(element_type)
@@ -59,10 +59,6 @@ def update_library_file(self, context):
)
def update_library_display_elements(self, context):
bpy.ops.bim.refresh_library()
def update_filter_mode(self, context):
self.filter_categories.clear()
if self.filter_mode == "NONE":
@@ -125,11 +121,6 @@ class BIMProjectProperties(PropertyGroup):
organisation_name: StringProperty(name="Organisation")
organisation_email: StringProperty(name="Organisation Email")
authorisation: StringProperty(name="Authoriser")
library_display_elements: BoolProperty(
name="Display IfcElements",
description="Display IfcElements from library too, not just the types",
update=update_library_display_elements,
)
active_library_element: StringProperty(name="Enable Authoring Mode", default="")
library_breadcrumb: CollectionProperty(name="Library Breadcrumb", type=StrProperty)
library_elements: CollectionProperty(name="Library Elements", type=LibraryElement)
@@ -272,9 +272,6 @@ class BIM_PT_project_library(Panel):
row.label(text="No Library Loaded", icon="ASSET_MANAGER")
def draw_library_ul(self):
self.layout.use_property_split = False
self.layout.prop(self.props, "library_display_elements")
self.layout.use_property_split = True
if not self.props.library_elements:
row = self.layout.row()
row.label(text="No Assets Found", icon="ERROR")