[Bf-blender-cvs] [c360702] master: Adding remaining object categories to the Create tab of the 3D View Toolbar.

Jonathan Williamson noreply at git.blender.org
Fri Jan 3 22:28:53 CET 2014


Commit: c36070299fb1380248115e547131b12d8954a564
Author: Jonathan Williamson
Date:   Thu Jan 2 17:27:37 2014 -0600
https://developer.blender.org/rBc36070299fb1380248115e547131b12d8954a564

Adding remaining object categories to the Create tab of the 3D View Toolbar.

This adds the remaining object categories to the Create tab, including Nurb Surfaces, Lamps, Meta objects, etc. I've also updated the labeling for the various buttons to be consistent with one another.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 8fad59b..769334e 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -72,7 +72,7 @@ def draw_gpencil_tools(context, layout):
 class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "objectmode"
-    bl_label = "Add Meshes"
+    bl_label = "Add Mesh"
     
     def draw (self, context):
         layout = self.layout
@@ -96,21 +96,91 @@ class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel):
 class VIEW3D_PT_tools_add_curve(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "objectmode"
-    bl_label = "Add Curves"
+    bl_label = "Add Curve"
     
-    def draw (self, context):
+    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.operator("curve.primitive_bezier_curve_add", text="Curve", icon="CURVE_BEZCURVE")
+        col.operator("curve.primitive_bezier_circle_add", text="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")
+        col.operator("curve.primitive_nurbs_curve_add", text="Curve", icon="CURVE_NCURVE")
+        col.operator("curve.primitive_nurbs_circle_add", text="Circle", icon="CURVE_NCIRCLE")
+        col.operator("curve.primitive_nurbs_path_add", text="Path" , icon="CURVE_PATH")
+        
+        
+class VIEW3D_PT_tools_add_surface(View3DPanel, Panel):
+    bl_category = "Create"
+    bl_context = "objectmode"
+    bl_label = "Add Surface"
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        col = layout.column(align=True)
+        
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Curve", icon="SURFACE_NCURVE")
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Circle", icon="SURFACE_NCIRCLE")
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Surface", icon="SURFACE_NSURFACE")
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Cylinder", icon="SURFACE_NCYLINDER")
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Sphere", icon="SURFACE_NSPHERE")
+        col.operator("surface.primitive_nurbs_surface_curve_add", text="Torus", icon="SURFACE_NTORUS")
+
+class VIEW3D_PT_tools_add_meta(View3DPanel, Panel):
+    bl_category = "Create"
+    bl_context = "objectmode"
+    bl_label = "Add Meta"
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        col = layout.column(align=True)
+        
+        col.operator("object.metaball_add", text="Ball", icon="META_BALL").type='BALL'
+        col.operator("object.metaball_add", text="Capsule", icon="META_CAPSULE").type='CAPSULE'
+        col.operator("object.metaball_add", text="Plane", icon="META_PLANE").type='PLANE'
+        col.operator("object.metaball_add", text="Ellipsoid", icon="META_ELLIPSOID").type='ELLIPSOID'
+        col.operator("object.metaball_add", text="Cube", icon="META_CUBE").type='CUBE'
+        
+
+class VIEW3D_PT_tools_add_lamp(View3DPanel, Panel):
+    bl_category = "Create"
+    bl_context = "objectmode"
+    bl_label = "Add Lamp"
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        col = layout.column(align=True)
+        
+        col.operator("object.lamp_add", text="Point", icon="LAMP_POINT").type='POINT'
+        col.operator("object.lamp_add", text="Sun", icon="LAMP_SUN").type='SUN'
+        col.operator("object.lamp_add", text="Spot", icon="LAMP_SPOT").type='SPOT'
+        col.operator("object.lamp_add", text="Hemi", icon="LAMP_HEMI").type='HEMI'
+        col.operator("object.lamp_add", text="Area", icon="LAMP_AREA").type='AREA'
+        
+
+class VIEW3D_PT_tools_add_other(View3DPanel, Panel):
+    bl_category = "Create"
+    bl_context = "objectmode"
+    bl_label = "Add Other"
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        col = layout.column(align=True)
+        
+        col.operator("object.text_add", text="Text", icon ="OUTLINER_OB_FONT")
+        col.operator("object.armature_add",text="Armature", icon="OUTLINER_OB_ARMATURE")
+        col.operator("object.add", text="Lattice", icon="OUTLINER_OB_LATTICE").type='LATTICE'
+        col.operator("object.empty_add", text="Empty", icon="OUTLINER_OB_EMPTY").type='PLAIN_AXES'
+        col.operator("object.speaker_add", text="Speaker", icon="OUTLINER_OB_SPEAKER")
+        col.operator("object.camera_add", text="Camera", icon="OUTLINER_OB_CAMERA")
+        col.operator("object.effector_add", text="Force Field", icon="OUTLINER_OB_EMPTY")
 
 class VIEW3D_PT_tools_basic(View3DPanel, Panel):
     bl_category = "Basic"




More information about the Bf-blender-cvs mailing list