Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Williamson <jonathan@cgcookie.com>2013-12-31 23:24:40 +0400
committerJonathan Williamson <jonathan@cgcookie.com>2014-01-04 01:28:18 +0400
commit153d415f1d47e8f6d4e90afefef9366505cc4669 (patch)
treef5a7dfb6bac163248f08dcd7118d43bb90cf47d9 /release
parent3a3cce2e9b08f88361ccddaa795f12710ce627b1 (diff)
Add Mesh buttons for 3D View Toolbar
This adds buttons in the 3D View toolbar to add new mesh objects to the scene. These buttons are added via the Create tab/category, soon to be populated with other object types as well. A panel is added for both Object mode and Edit mode so as to not display in incorrect context (such as Pose Mode).
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py49
1 files changed, 49 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 cca2244d868..d0e02a0b8f0 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -69,6 +69,30 @@ def draw_gpencil_tools(context, layout):
# ********** default tools for object-mode ****************
+class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel):
+ bl_category = "Create"
+ bl_context = "objectmode"
+ bl_label = "Add Meshes"
+
+ def draw (self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ col.label(text="Primitives:")
+ col.operator("mesh.primitive_plane_add", text="Plane", icon="MESH_PLANE")
+ col.operator("mesh.primitive_cube_add", text="Cube", icon="MESH_CUBE")
+ col.operator("mesh.primitive_circle_add", text="Circle", icon="MESH_CIRCLE")
+ col.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon="MESH_UVSPHERE")
+ col.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon="MESH_ICOSPHERE")
+ col.operator("mesh.primitive_cylinder_add", text="Cylinder", icon="MESH_CYLINDER")
+ col.operator("mesh.primitive_cone_add", text="Cone", icon="MESH_CONE")
+ col.operator("mesh.primitive_torus_add", text="Torus", icon="MESH_TORUS")
+
+ col = layout.column(align=True)
+ col.label(text="Special:")
+ 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_basic(View3DPanel, Panel):
bl_category = "Basic"
bl_context = "objectmode"
@@ -107,6 +131,7 @@ class VIEW3D_PT_tools_basic(View3DPanel, Panel):
row.operator("object.shade_smooth", text="Smooth")
row.operator("object.shade_flat", text="Flat")
+
class VIEW3D_PT_tools_animation(View3DPanel, Panel):
bl_category = "Animation"
bl_context = "objectmode"
@@ -172,6 +197,30 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
# ********** default tools for editmode_mesh ****************
+class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel):
+ bl_category = "Create"
+ bl_context = "mesh_edit"
+ bl_label = "Add Meshes"
+
+ def draw (self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ col.label(text="Primitives:")
+ col.operator("mesh.primitive_plane_add", text="Plane", icon="MESH_PLANE")
+ col.operator("mesh.primitive_cube_add", text="Cube", icon="MESH_CUBE")
+ col.operator("mesh.primitive_circle_add", text="Circle", icon="MESH_CIRCLE")
+ col.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon="MESH_UVSPHERE")
+ col.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon="MESH_ICOSPHERE")
+ col.operator("mesh.primitive_cylinder_add", text="Cylinder", icon="MESH_CYLINDER")
+ col.operator("mesh.primitive_cone_add", text="Cone", icon="MESH_CONE")
+ col.operator("mesh.primitive_torus_add", text="Torus", icon="MESH_TORUS")
+
+ col = layout.column(align=True)
+ col.label(text="Special:")
+ 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_meshedit(View3DPanel, Panel):
bl_context = "mesh_edit"
bl_label = "Mesh Tools"