Annotation tools are now in the viewport instead of in properties for easier access

This commit is contained in:
Dion Moult
2020-08-29 11:02:43 +10:00
parent c5dd9a24cb
commit 77d686724e
2 changed files with 44 additions and 32 deletions
@@ -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,
+43 -32
View File
@@ -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"