@@ -71,6 +71,7 @@ def draw_create_project_ui(self, context):
7171class BIM_PT_project_library (Panel ):
7272 bl_label = "IFC Project Library"
7373 bl_idname = "BIM_PT_project_library"
74+ bl_options = {"DEFAULT_CLOSED" }
7475 bl_space_type = "PROPERTIES"
7576 bl_region_type = "WINDOW"
7677 bl_context = "scene"
@@ -117,14 +118,16 @@ def draw_item(self, context, layout, data, item, icon, active_data, active_propn
117118 op .element_name = item .name
118119 row .label (text = item .name )
119120 if (
120- not item .ifc_definition_id
121- or IfcStore .library_file .schema = = "IFC2X3"
122- or not IfcStore .library_file .by_type ("IfcProjectLibrary" )
121+ item .ifc_definition_id
122+ and IfcStore .library_file .schema ! = "IFC2X3"
123+ and IfcStore .library_file .by_type ("IfcProjectLibrary" )
123124 ):
124- return
125- if item .is_declared :
126- op = row .operator ("bim.unassign_library_declaration" , text = "" , icon = "KEYFRAME_HLT" , emboss = False )
127- op .definition = item .ifc_definition_id
128- else :
129- op = row .operator ("bim.assign_library_declaration" , text = "" , icon = "KEYFRAME" , emboss = False )
125+ if item .is_declared :
126+ op = row .operator ("bim.unassign_library_declaration" , text = "" , icon = "KEYFRAME_HLT" , emboss = False )
127+ op .definition = item .ifc_definition_id
128+ else :
129+ op = row .operator ("bim.assign_library_declaration" , text = "" , icon = "KEYFRAME" , emboss = False )
130+ op .definition = item .ifc_definition_id
131+ if item .ifc_definition_id :
132+ op = row .operator ("bim.append_library_element" , text = "" , icon = "APPEND_BLEND" )
130133 op .definition = item .ifc_definition_id
0 commit comments