Minor refactor

This commit is contained in:
Dion Moult
2021-05-18 17:48:44 +10:00
parent 0d5110b7af
commit 319fe13f9e
5 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ class IfcExporter:
obj = bpy.data.objects.get(obj_name)
if not obj:
continue
bpy.ops.bim.update_mesh_representation(obj=obj.name)
bpy.ops.bim.update_representation(obj=obj.name)
IfcStore.edited_objs.clear()
def sync_object_placement(self, obj):
@@ -343,7 +343,7 @@ class AddAnnotation(bpy.types.Operator):
if not obj.BIMObjectProperties.ifc_definition_id:
bpy.ops.bim.assign_class(obj=obj.name, ifc_class="IfcAnnotation", context_id=subcontext.id())
else:
bpy.ops.bim.update_mesh_representation(obj=obj.name)
bpy.ops.bim.update_representation(obj=obj.name)
bpy.ops.object.select_all(action="DESELECT")
bpy.context.view_layer.objects.active = obj
@@ -6,7 +6,7 @@ classes = (
operator.AddRepresentation,
operator.SwitchRepresentation,
operator.RemoveRepresentation,
operator.UpdateMeshRepresentation,
operator.UpdateRepresentation,
operator.UpdateParametricRepresentation,
operator.GetRepresentationIfcParameters,
prop.BIMGeometryProperties,
@@ -271,9 +271,9 @@ class RemoveRepresentation(bpy.types.Operator):
return {"FINISHED"}
class UpdateMeshRepresentation(bpy.types.Operator):
bl_idname = "bim.update_mesh_representation"
bl_label = "Update Mesh Representation"
class UpdateRepresentation(bpy.types.Operator):
bl_idname = "bim.update_representation"
bl_label = "Update Representation"
obj: bpy.props.StringProperty()
ifc_representation_class: bpy.props.StringProperty()
@@ -78,22 +78,22 @@ class BIM_PT_mesh(Panel):
op.disable_opening_subtractions = True
row = layout.row()
row.operator("bim.update_mesh_representation")
row.operator("bim.update_representation")
row = layout.row()
op = row.operator("bim.update_mesh_representation", text="Update Mesh As Rectangle Extrusion")
op = row.operator("bim.update_representation", text="Update Mesh As Rectangle Extrusion")
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcRectangleProfileDef"
row = layout.row()
op = row.operator("bim.update_mesh_representation", text="Update Mesh As Circle Extrusion")
op = row.operator("bim.update_representation", text="Update Mesh As Circle Extrusion")
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcCircleProfileDef"
row = layout.row()
op = row.operator("bim.update_mesh_representation", text="Update Mesh As Arbitrary Extrusion")
op = row.operator("bim.update_representation", text="Update Mesh As Arbitrary Extrusion")
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef"
row = layout.row()
op = row.operator("bim.update_mesh_representation", text="Update Mesh As Arbitrary Extrusion With Voids")
op = row.operator("bim.update_representation", text="Update Mesh As Arbitrary Extrusion With Voids")
op.ifc_representation_class = "IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids"
row = layout.row()