mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Indicate in UI if object's ifc placement/representation is not synced
Example - https://imgur.com/a/lixOxeN Ideally users shouldn't need those as syncing should work seamlessly but since we do have syncing it can be useful if you can check sync status from the UI.
This commit is contained in:
@@ -53,6 +53,10 @@ class Operator:
|
||||
class EditObjectPlacement(bpy.types.Operator, Operator):
|
||||
bl_idname = "bim.edit_object_placement"
|
||||
bl_label = "Edit Object Placement"
|
||||
bl_description = (
|
||||
"Write selected objects placements to IFC.\n"
|
||||
"A star in the operator name indicates that active object placement in IFC is not yet synced with Blender"
|
||||
)
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
obj: bpy.props.StringProperty()
|
||||
|
||||
@@ -305,6 +309,10 @@ class PurgeUnusedRepresentations(bpy.types.Operator, Operator):
|
||||
class UpdateRepresentation(bpy.types.Operator, Operator):
|
||||
bl_idname = "bim.update_representation"
|
||||
bl_label = "Update Representation"
|
||||
bl_description = (
|
||||
"Write selected objects representations to IFC.\n"
|
||||
"A star in the operator name indicates that active object representation in IFC is not yet synced with Blender"
|
||||
)
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
obj: bpy.props.StringProperty()
|
||||
ifc_representation_class: bpy.props.StringProperty()
|
||||
|
||||
@@ -352,7 +352,10 @@ class BIM_PT_mesh(Panel):
|
||||
layout = self.layout
|
||||
|
||||
row = layout.row()
|
||||
row.operator("bim.update_representation", text="Manually Save Representation")
|
||||
text = "Manually Save Representation"
|
||||
if tool.Ifc.is_edited(context.active_object):
|
||||
text += "*"
|
||||
row.operator("bim.update_representation", text=text)
|
||||
|
||||
row = layout.row()
|
||||
row.operator("bim.copy_representation", text="Copy Mesh From Active To Selected")
|
||||
@@ -447,7 +450,10 @@ class BIM_PT_derived_coordinates(Panel):
|
||||
DerivedCoordinatesData.load()
|
||||
|
||||
row = self.layout.row()
|
||||
row.operator("bim.edit_object_placement", icon="EXPORT")
|
||||
text = "Edit Object Placement"
|
||||
if tool.Ifc.is_moved(context.active_object):
|
||||
text += "*"
|
||||
row.operator("bim.edit_object_placement", text=text, icon="EXPORT")
|
||||
|
||||
row = self.layout.row()
|
||||
row.label(text="XYZ Dimensions")
|
||||
|
||||
Reference in New Issue
Block a user