diff options
author | Jonathan Williamson <jonathan@cgcookie.com> | 2013-12-31 23:29:17 +0400 |
---|---|---|
committer | Jonathan Williamson <jonathan@cgcookie.com> | 2014-01-04 01:28:18 +0400 |
commit | 2fbfa768084598b5b6c480ae80cd4f0f8bb3dd57 (patch) | |
tree | acd7b7483c23097eac6be3a1a73545c7e2e37563 /release | |
parent | 153d415f1d47e8f6d4e90afefef9366505cc4669 (diff) |
Add "Add Curve" buttons to 3D View Toolbar
This creates a series of buttons in the 3D View toolbar to add new curve objects to the scene. This new panel is categorized under the Create tab.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index d0e02a0b8f0..8fad59b19f4 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -93,6 +93,25 @@ class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel): col.operator("mesh.primitive_grid_add", text="Grid", icon="MESH_GRID") col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY") +class VIEW3D_PT_tools_add_curve(View3DPanel, Panel): + bl_category = "Create" + bl_context = "objectmode" + bl_label = "Add Curves" + + def draw (self, context): + layout = self.layout + + col = layout.column(align=True) + + col.label(text="Bezier:") + col.operator("curve.primitive_bezier_curve_add", text="Bezier Curve", icon="CURVE_BEZCURVE") + col.operator("curve.primitive_bezier_circle_add", text="Bezier Circle", icon="CURVE_BEZCIRCLE") + + col.label(text="Nurbs:") + col.operator("curve.primitive_nurbs_curve_add", text="Nurbs Curve", icon="CURVE_NCURVE") + col.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon="CURVE_NCIRCLE") + col.operator("curve.primitive_nurbs_path_add", text="Nurbs Path" , icon="CURVE_PATH") + class VIEW3D_PT_tools_basic(View3DPanel, Panel): bl_category = "Basic" bl_context = "objectmode" @@ -331,6 +350,24 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): # ********** default tools for editmode_curve **************** +class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel): + bl_category = "Create" + bl_context = "curve_edit" + bl_label = "Add Curves" + + def draw (self, context): + layout = self.layout + + col = layout.column(align=True) + + col.label(text="Bezier:") + col.operator("curve.primitive_bezier_curve_add", text="Bezier Curve", icon="CURVE_BEZCURVE") + col.operator("curve.primitive_bezier_circle_add", text="Bezier Circle", icon="CURVE_BEZCIRCLE") + + col.label(text="Nurbs:") + col.operator("curve.primitive_nurbs_curve_add", text="Nurbs Curve", icon="CURVE_NCURVE") + col.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon="CURVE_NCIRCLE") + col.operator("curve.primitive_nurbs_path_add", text="Nurbs Path" , icon="CURVE_PATH") class VIEW3D_PT_tools_curveedit(View3DPanel, Panel): bl_context = "curve_edit" |