Merge branch 'v0.6.0' of https://github.com/IfcOpenShell/IfcOpenShell into presentationlayer

This commit is contained in:
Kristoffer
2020-11-09 13:35:15 +01:00
15 changed files with 348 additions and 118 deletions
+68 -14
View File
@@ -194,6 +194,41 @@ class BIM_PT_object_material(Panel):
row.prop(material, "fraction")
row = layout.row()
row.prop(material, "category")
elif props.material_type == "IfcMaterialProfileSet":
row.template_list(
"MATERIAL_UL_matslots",
"",
set_props,
"material_profiles",
set_props,
"active_material_profile_index",
)
col = row.column(align=True)
col.operator("bim.add_material_profile", icon="ADD", text="")
col.operator(
"bim.remove_material_profile", icon="REMOVE", text=""
).index = set_props.active_material_profile_index
col.operator("bim.move_material_profile", icon="TRIA_UP", text="").direction = "UP"
col.operator("bim.move_material_profile", icon="TRIA_DOWN", text="").direction = "DOWN"
if set_props.active_material_profile_index < len(set_props.material_profiles):
material = set_props.material_profiles[set_props.active_material_profile_index]
row = layout.row()
row.prop(material, "material")
row = layout.row()
row.prop(material, "name")
row = layout.row()
row.prop(material, "description")
row = layout.row()
row.prop(material, "priority")
row = layout.row()
row.prop(material, "category")
row = layout.row()
row.prop(material, "profile")
for index, attribute in enumerate(material.profile_attributes):
row = layout.row(align=True)
row.prop(attribute, "name", text="")
row.prop(attribute, "string_value", text="")
class BIM_PT_object_psets(Panel):
@@ -876,16 +911,6 @@ class BIM_PT_material(Panel):
row = layout.row()
row.prop(props, "psets", text="")
if context.active_object.BIMObjectProperties.material_type == "IfcMaterialProfileSet":
layout.label(text="Profile Definition:")
row = layout.row()
row.prop(props, "profile_def")
for index, attribute in enumerate(props.profile_attributes):
row = layout.row(align=True)
row.prop(attribute, "name", text="")
row.prop(attribute, "string_value", text="")
class BIM_PT_gis(Panel):
bl_label = "IFC Georeferencing"
@@ -2334,19 +2359,48 @@ class BIM_PT_debug(Panel):
layout = self.layout
scene = context.scene
bim_props = scene.BIMProperties
debug_props = scene.BIMDebugProperties
props = scene.BIMDebugProperties
row = layout.row()
row.prop(debug_props, "step_id", text="")
row.prop(props, "step_id", text="")
row = layout.row()
row.operator("bim.create_shape_from_step_id")
row = layout.row()
row.prop(debug_props, "number_of_polygons", text="")
row.prop(props, "number_of_polygons", text="")
row = layout.row()
row.operator("bim.select_high_polygon_meshes")
layout.label(text="Inspector:")
row = layout.row(align=True)
if len(props.step_id_breadcrumb) >= 2:
row.operator("bim.rewind_inspector", icon="FRAME_PREV", text="")
row.prop(props, "active_step_id", text="")
row = layout.row(align=True)
row.operator("bim.inspect_from_step_id").step_id = bpy.context.scene.BIMDebugProperties.active_step_id
row.operator("bim.inspect_from_object")
if props.attributes:
layout.label(text="Direct attributes:")
for index, attribute in enumerate(props.attributes):
row = layout.row(align=True)
row.prop(attribute, "name", text="")
row.prop(attribute, "string_value", text="")
if attribute.int_value:
row.operator("bim.inspect_from_step_id", icon="DISCLOSURE_TRI_RIGHT", text="").step_id = attribute.int_value
if props.inverse_attributes:
layout.label(text="Inverse attributes:")
for index, attribute in enumerate(props.inverse_attributes):
row = layout.row(align=True)
row.prop(attribute, "name", text="")
row.prop(attribute, "string_value", text="")
if attribute.int_value:
row.operator("bim.inspect_from_step_id", icon="DISCLOSURE_TRI_RIGHT", text="").step_id = attribute.int_value
def ifc_units(self, context):
scene = context.scene