mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Fix #3465. Move representation utilities into new tab system.
This commit is contained in:
@@ -121,7 +121,7 @@ class PurgeIfcLinks(bpy.types.Operator):
|
|||||||
|
|
||||||
|
|
||||||
class ConvertToBlender(bpy.types.Operator):
|
class ConvertToBlender(bpy.types.Operator):
|
||||||
bl_idname = "bim.converttoblender"
|
bl_idname = "bim.convert_to_blender"
|
||||||
bl_label = "Convert To Blender File"
|
bl_label = "Convert To Blender File"
|
||||||
bl_description = "Removes all IFC data, and converts the file to a simple Blender file."
|
bl_description = "Removes all IFC data, and converts the file to a simple Blender file."
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|||||||
@@ -58,7 +58,10 @@ class BIM_PT_debug(Panel):
|
|||||||
row.operator("bim.purge_ifc_links")
|
row.operator("bim.purge_ifc_links")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.converttoblender")
|
row.operator("bim.update_representation", text="Manually Save Representation")
|
||||||
|
|
||||||
|
row = layout.row()
|
||||||
|
row.operator("bim.convert_to_blender")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.create_all_shapes")
|
row.operator("bim.create_all_shapes")
|
||||||
@@ -80,6 +83,16 @@ class BIM_PT_debug(Panel):
|
|||||||
).percentile = context.scene.BIMDebugProperties.percentile_of_polygons
|
).percentile = context.scene.BIMDebugProperties.percentile_of_polygons
|
||||||
row.prop(props, "percentile_of_polygons", text="")
|
row.prop(props, "percentile_of_polygons", text="")
|
||||||
|
|
||||||
|
if context.active_object and context.active_object.data:
|
||||||
|
mprops = context.active_object.data.BIMMeshProperties
|
||||||
|
row = layout.row()
|
||||||
|
row.operator("bim.get_representation_ifc_parameters")
|
||||||
|
for index, ifc_parameter in enumerate(mprops.ifc_parameters):
|
||||||
|
row = layout.row(align=True)
|
||||||
|
row.prop(ifc_parameter, "name", text="")
|
||||||
|
row.prop(ifc_parameter, "value", text="")
|
||||||
|
row.operator("bim.update_parametric_representation", icon="FILE_REFRESH", text="").index = index
|
||||||
|
|
||||||
layout.label(text="Inspector:")
|
layout.label(text="Inspector:")
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
|
|||||||
@@ -125,11 +125,14 @@ class BIM_PT_connections(Panel):
|
|||||||
|
|
||||||
|
|
||||||
class BIM_PT_mesh(Panel):
|
class BIM_PT_mesh(Panel):
|
||||||
bl_label = "Representation"
|
bl_label = "Representation Utilities"
|
||||||
bl_idname = "BIM_PT_mesh"
|
bl_idname = "BIM_PT_mesh"
|
||||||
bl_space_type = "PROPERTIES"
|
bl_space_type = "PROPERTIES"
|
||||||
bl_region_type = "WINDOW"
|
bl_region_type = "WINDOW"
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
bl_order = 2
|
||||||
|
bl_options = {"DEFAULT_CLOSED"}
|
||||||
|
bl_parent_id = "BIM_PT_tab_representations"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@@ -143,43 +146,34 @@ class BIM_PT_mesh(Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
if not context.active_object.data:
|
if not context.active_object.data:
|
||||||
return
|
return
|
||||||
|
row = self.layout.row()
|
||||||
|
row.label(text="Advanced Users Only", icon="ERROR")
|
||||||
|
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
props = context.active_object.data.BIMMeshProperties
|
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.copy_representation")
|
row.operator("bim.copy_representation", text="Copy Mesh From Active To Selected")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.update_representation")
|
op = row.operator("bim.update_representation", text="Convert To Tessellation")
|
||||||
|
|
||||||
row = layout.row()
|
|
||||||
op = row.operator("bim.update_representation", text="Update Mesh As Tessellation")
|
|
||||||
op.ifc_representation_class = "IfcTessellatedFaceSet"
|
op.ifc_representation_class = "IfcTessellatedFaceSet"
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
op = row.operator("bim.update_representation", text="Update Mesh As Rectangle Extrusion")
|
op = row.operator("bim.update_representation", text="Convert To Rectangle Extrusion")
|
||||||
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcRectangleProfileDef"
|
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcRectangleProfileDef"
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
op = row.operator("bim.update_representation", text="Update Mesh As Circle Extrusion")
|
op = row.operator("bim.update_representation", text="Convert To Circle Extrusion")
|
||||||
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcCircleProfileDef"
|
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcCircleProfileDef"
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
op = row.operator("bim.update_representation", text="Update Mesh As Arbitrary Extrusion")
|
op = row.operator("bim.update_representation", text="Convert To Arbitrary Extrusion")
|
||||||
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
|
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
op = row.operator("bim.update_representation", text="Update Mesh As Arbitrary Extrusion With Voids")
|
op = row.operator("bim.update_representation", text="Convert To Arbitrary Extrusion With Voids")
|
||||||
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids"
|
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids"
|
||||||
|
|
||||||
row = layout.row()
|
|
||||||
row.operator("bim.get_representation_ifc_parameters")
|
|
||||||
for index, ifc_parameter in enumerate(props.ifc_parameters):
|
|
||||||
row = layout.row(align=True)
|
|
||||||
row.prop(ifc_parameter, "name", text="")
|
|
||||||
row.prop(ifc_parameter, "value", text="")
|
|
||||||
row.operator("bim.update_parametric_representation", icon="FILE_REFRESH", text="").index = index
|
|
||||||
|
|
||||||
|
|
||||||
def BIM_PT_transform(self, context):
|
def BIM_PT_transform(self, context):
|
||||||
if context.active_object and context.active_object.BIMObjectProperties.ifc_definition_id:
|
if context.active_object and context.active_object.BIMObjectProperties.ifc_definition_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user