From 77d686724e2ac9171725a5329eb94053ba0d91f2 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 29 Aug 2020 11:02:43 +1000 Subject: [PATCH] Annotation tools are now in the viewport instead of in properties for easier access --- .../blenderbim/bim/__init__.py | 1 + src/ifcblenderexport/blenderbim/bim/ui.py | 75 +++++++++++-------- 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/__init__.py b/src/ifcblenderexport/blenderbim/bim/__init__.py index 37a9019853..76299f4500 100644 --- a/src/ifcblenderexport/blenderbim/bim/__init__.py +++ b/src/ifcblenderexport/blenderbim/bim/__init__.py @@ -273,6 +273,7 @@ if bpy is not None: ui.BIM_PT_camera, ui.BIM_PT_text, ui.BIM_PT_modeling_utilities, + ui.BIM_PT_annotation_utilities, ui.BIM_PT_qto_utilities, ui.BIM_PT_misc_utilities, ui.BIM_UL_generic, diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index a61ea6bf26..ebf4d6a8b8 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -851,38 +851,6 @@ class BIM_PT_camera(Panel): dprops = bpy.context.scene.DocProperties props = context.active_object.data.BIMCameraProperties - layout.label(text="Annotation:") - row = layout.row(align=True) - op = row.operator('bim.add_annotation', text='Dim', icon='ARROW_LEFTRIGHT') - op.obj_name = 'Dimension' - op.data_type = 'curve' - op = row.operator('bim.add_annotation', text='Dim (Eq)', icon='ARROW_LEFTRIGHT') - op.obj_name = 'Equal' - op.data_type = 'curve' - - row = layout.row(align=True) - op = row.operator('bim.add_annotation', text='Text', icon='SMALL_CAPS') - op.data_type = 'text' - op = row.operator('bim.add_annotation', text='Leader', icon='TRACKING_BACKWARDS') - op.obj_name = 'Leader' - op.data_type = 'curve' - - row = layout.row(align=True) - op = row.operator('bim.add_annotation', text='Stair Arrow', icon='SCREEN_BACK') - op.obj_name = 'Stair' - op.data_type = 'curve' - op = row.operator('bim.add_annotation', text='Hidden', icon='CON_TRACKTO') - op.obj_name = 'Hidden' - op.data_type = 'mesh' - - row = layout.row(align=True) - op = row.operator('bim.add_annotation', text='Level (Plan)', icon='SORTBYEXT') - op.obj_name = 'Plan Level' - op.data_type = 'curve' - op = row.operator('bim.add_annotation', text='Level (Section)', icon='TRIA_DOWN') - op.obj_name = 'Section Level' - op.data_type = 'curve' - layout.label(text="Generation Options:") row = layout.row() @@ -1930,6 +1898,49 @@ class BIM_PT_modeling_utilities(Panel): row.operator("bim.add_opening") +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 = 'BlenderBIM' + + def draw(self, context): + layout = self.layout + + row = layout.row(align=True) + op = row.operator('bim.add_annotation', text='Dim', icon='ARROW_LEFTRIGHT') + op.obj_name = 'Dimension' + op.data_type = 'curve' + op = row.operator('bim.add_annotation', text='Dim (Eq)', icon='ARROW_LEFTRIGHT') + op.obj_name = 'Equal' + op.data_type = 'curve' + + row = layout.row(align=True) + op = row.operator('bim.add_annotation', text='Text', icon='SMALL_CAPS') + op.data_type = 'text' + op = row.operator('bim.add_annotation', text='Leader', icon='TRACKING_BACKWARDS') + op.obj_name = 'Leader' + op.data_type = 'curve' + + row = layout.row(align=True) + op = row.operator('bim.add_annotation', text='Stair Arrow', icon='SCREEN_BACK') + op.obj_name = 'Stair' + op.data_type = 'curve' + op = row.operator('bim.add_annotation', text='Hidden', icon='CON_TRACKTO') + op.obj_name = 'Hidden' + op.data_type = 'mesh' + + row = layout.row(align=True) + op = row.operator('bim.add_annotation', text='Level (Plan)', icon='SORTBYEXT') + op.obj_name = 'Plan Level' + op.data_type = 'curve' + op = row.operator('bim.add_annotation', text='Level (Section)', icon='TRIA_DOWN') + op.obj_name = 'Section Level' + op.data_type = 'curve' + + + class BIM_PT_qto_utilities(Panel): bl_idname = "BIM_PT_qto_utilities" bl_label = "Quantity Take-off"