mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +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):
|
def inherited_psets(cls):
|
||||||
element = tool.Ifc.get_entity(bpy.context.active_object)
|
element = tool.Ifc.get_entity(bpy.context.active_object)
|
||||||
if element.is_a("IfcTypeObject"):
|
if element.is_a("IfcTypeObject"):
|
||||||
return
|
return []
|
||||||
element_type = ifcopenshell.util.element.get_type(element)
|
element_type = ifcopenshell.util.element.get_type(element)
|
||||||
if element_type:
|
if element_type:
|
||||||
return cls.psetqtos(element_type)
|
return cls.psetqtos(element_type, psets_only=True)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pset_name(cls):
|
def pset_name(cls):
|
||||||
@@ -125,9 +125,21 @@ class ObjectQtosData(Data):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load(cls):
|
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
|
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):
|
class MaterialPsetsData(Data):
|
||||||
data = {}
|
data = {}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ from blenderbim.bim.module.pset.data import (
|
|||||||
GroupPsetData,
|
GroupPsetData,
|
||||||
ProfilePsetsData,
|
ProfilePsetsData,
|
||||||
WorkSchedulePsetsData,
|
WorkSchedulePsetsData,
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -249,6 +248,11 @@ class BIM_PT_object_qtos(Panel):
|
|||||||
for qto in ObjectQtosData.data["qtos"]:
|
for qto in ObjectQtosData.data["qtos"]:
|
||||||
draw_psetqto_ui(context, qto["id"], qto, props, self.layout, "Object")
|
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):
|
class BIM_PT_material_psets(Panel):
|
||||||
bl_label = "Material Property Sets"
|
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")
|
draw_psetqto_ui(context, pset["id"], pset, props, self.layout, "Group")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BIM_PT_profile_psets(Panel):
|
class BIM_PT_profile_psets(Panel):
|
||||||
bl_label = "Profile Property Sets"
|
bl_label = "Profile Property Sets"
|
||||||
bl_idname = "BIM_PT_profile_psets"
|
bl_idname = "BIM_PT_profile_psets"
|
||||||
|
|||||||
Reference in New Issue
Block a user