From 8e053de4e5ecea06cb82c94ff69cc2b4712336a1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 8 Jul 2023 10:58:44 +1000 Subject: [PATCH] Delete old annotation panel in favour of annotation tool --- .../blenderbim/bim/module/drawing/__init__.py | 1 - .../blenderbim/bim/module/drawing/ui.py | 81 ------------------- .../bim/module/drawing/workspace.py | 3 + 3 files changed, 3 insertions(+), 82 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/drawing/__init__.py b/src/blenderbim/blenderbim/bim/module/drawing/__init__.py index 55a1070ab3..ba1d9a4f87 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/__init__.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/__init__.py @@ -89,7 +89,6 @@ classes = ( prop.BIMAnnotationProperties, ui.BIM_PT_camera, ui.BIM_PT_drawing_underlay, - ui.BIM_PT_annotation_utilities, ui.BIM_PT_sheets, ui.BIM_PT_drawings, ui.BIM_PT_schedules, diff --git a/src/blenderbim/blenderbim/bim/module/drawing/ui.py b/src/blenderbim/blenderbim/bim/module/drawing/ui.py index 3b1782227f..2aa75e30b5 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/ui.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/ui.py @@ -489,87 +489,6 @@ class BIM_PT_text(Panel): row.label(text=literal_data[attribute]) -class BIM_PT_annotation_utilities(Panel): - bl_idname = "BIM_PT_annotation_utilities" - bl_label = "Annotation" - bl_space_type = "VIEW_3D" - bl_region_type = "UI" - bl_category = "BIM Documentation" - - def draw(self, context): - layout = self.layout - - self.props = context.scene.DocProperties - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Dimension", icon="FIXED_SIZE") - op.object_type = "DIMENSION" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Angle", icon="DRIVER_ROTATIONAL_DIFFERENCE") - op.object_type = "ANGLE" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Radius", icon="FORWARD") - op.object_type = "RADIUS" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Diameter", icon="ARROW_LEFTRIGHT") - op.object_type = "DIAMETER" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Text", icon="SMALL_CAPS") - op.object_type = "TEXT" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Leader", icon="TRACKING_BACKWARDS") - op.object_type = "TEXT_LEADER" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Stair Arrow", icon="SCREEN_BACK") - op.object_type = "STAIR_ARROW" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Hidden", icon="CON_TRACKTO") - op.object_type = "HIDDEN_LINE" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Level (Plan)", icon="SORTBYEXT") - op.object_type = "PLAN_LEVEL" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Level (Section)", icon="TRIA_DOWN") - op.object_type = "SECTION_LEVEL" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Breakline", icon="FCURVE") - op.object_type = "BREAKLINE" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Line", icon="MESH_MONKEY") - op.object_type = "LINEWORK" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Batting", icon="FORCE_FORCE") - op.object_type = "BATTING" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op.description = "Add batting annotation.\nThickness could be changed through Thickness property of BBIM_Batting property set" - op = row.operator("bim.add_annotation", text="Fill Area", icon="NODE_TEXTURE") - op.object_type = "FILL_AREA" - - row = layout.row(align=True) - op = row.operator("bim.add_annotation", text="Fall", icon="SORT_ASC") - op.object_type = "FALL" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - op = row.operator("bim.add_annotation", text="Revision", icon="VOLUME_DATA") - op.object_type = "REVISION_CLOUD" - op.data_type = tool.Drawing.get_annotation_data_type(op.object_type) - - row = layout.row(align=True) - row.prop(self.props, "should_draw_decorations", text="Viewport Annotations") - row.enabled = context.scene.camera is not None - - class BIM_UL_drawinglist(bpy.types.UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname): if item: diff --git a/src/blenderbim/blenderbim/bim/module/drawing/workspace.py b/src/blenderbim/blenderbim/bim/module/drawing/workspace.py index 34530ef02f..7df3a3b05e 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/workspace.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/workspace.py @@ -187,6 +187,9 @@ class AnnotationToolUI: selected_icon = "CHECKBOX_HLT" if cls.props.create_representation_for_type else "CHECKBOX_DEHLT" row.prop(cls.props, "create_representation_for_type", text="", icon=selected_icon) + row = cls.layout.row(align=True) + row.prop(bpy.context.scene.DocProperties, "should_draw_decorations", text="Viewport Annotations") + @classmethod def draw_edit_object_interface(cls, context): if DecoratorData.get_ifc_text_data(bpy.context.object):