mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
fixed qsets to display separately (#4423)
* fixed qsets to display separately Signed-off-by: milinddethe15 <milinddethe15@gmail.com> * updated data.py and run black formattor --------- Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
This commit is contained in:
@@ -80,10 +80,10 @@ class ObjectPsetsData(Data):
|
||||
def inherited_psets(cls):
|
||||
element = tool.Ifc.get_entity(bpy.context.active_object)
|
||||
if element.is_a("IfcTypeObject"):
|
||||
return
|
||||
return []
|
||||
element_type = ifcopenshell.util.element.get_type(element)
|
||||
if element_type:
|
||||
return cls.psetqtos(element_type)
|
||||
return cls.psetqtos(element_type, psets_only=True)
|
||||
|
||||
@classmethod
|
||||
def pset_name(cls):
|
||||
@@ -125,9 +125,21 @@ class ObjectQtosData(Data):
|
||||
|
||||
@classmethod
|
||||
def load(cls):
|
||||
cls.data = {"qtos": cls.psetqtos(tool.Ifc.get_entity(bpy.context.active_object), qtos_only=True)}
|
||||
cls.data = {
|
||||
"qtos": cls.psetqtos(tool.Ifc.get_entity(bpy.context.active_object), qtos_only=True),
|
||||
"inherited_qsets": cls.inherited_qsets(),
|
||||
}
|
||||
cls.is_loaded = True
|
||||
|
||||
@classmethod
|
||||
def inherited_qsets(cls):
|
||||
element = tool.Ifc.get_entity(bpy.context.active_object)
|
||||
if element.is_a("IfcTypeObject"):
|
||||
return []
|
||||
element_type = ifcopenshell.util.element.get_type(element)
|
||||
if element_type:
|
||||
return cls.psetqtos(element_type, qtos_only=True)
|
||||
|
||||
|
||||
class MaterialPsetsData(Data):
|
||||
data = {}
|
||||
|
||||
@@ -33,7 +33,6 @@ from blenderbim.bim.module.pset.data import (
|
||||
GroupPsetData,
|
||||
ProfilePsetsData,
|
||||
WorkSchedulePsetsData,
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -249,6 +248,11 @@ class BIM_PT_object_qtos(Panel):
|
||||
for qto in ObjectQtosData.data["qtos"]:
|
||||
draw_psetqto_ui(context, qto["id"], qto, props, self.layout, "Object")
|
||||
|
||||
if ObjectQtosData.data["inherited_qsets"]:
|
||||
self.layout.label(text="Inherited Qsets:", icon="FILE_PARENT")
|
||||
for qset in ObjectQtosData.data["inherited_qsets"]:
|
||||
draw_psetqto_ui(context, qset["id"], qset, props, self.layout, "Object")
|
||||
|
||||
|
||||
class BIM_PT_material_psets(Panel):
|
||||
bl_label = "Material Property Sets"
|
||||
@@ -541,8 +545,6 @@ class BIM_PT_group_psets(Panel):
|
||||
draw_psetqto_ui(context, pset["id"], pset, props, self.layout, "Group")
|
||||
|
||||
|
||||
|
||||
|
||||
class BIM_PT_profile_psets(Panel):
|
||||
bl_label = "Profile Property Sets"
|
||||
bl_idname = "BIM_PT_profile_psets"
|
||||
|
||||
Reference in New Issue
Block a user