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-23 03:13:29 +0400
committerJonathan Williamson <jonathan@cgcookie.com>2014-01-04 01:28:18 +0400
commit428a8d5980277d70bc041129a5c33ca9c85c6b9e (patch)
treec9aadc82ed4fa2ac6443d51f62f969c92acd1fa8
parent4d4222b7619de408ce0be3af667ed8cfdf729ebe (diff)
Object Mode Toolbar Tabs
Summary: Here are the initial tabs for the 3D View Object Mode toolbar. This is based on the discussions between myself and @billrey in T37569 P.S. apologies for the duplicate. The first one I mistakenly sent to the Edit Mode task, T37568. I have corrected it and also made a couple changes, per @campbellbarton's request. Reviewers: campbellbarton CC: campbellbarton, brecht, billrey Maniphest Tasks: T37569 Differential Revision: http://developer.blender.org/D129
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py66
1 files changed, 44 insertions, 22 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 9a56cc5754c..d9bbf3e3b08 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -40,7 +40,6 @@ def draw_repeat_tools(context, layout):
col.operator("screen.repeat_last")
col.operator("screen.repeat_history", text="History...")
-
# Keyframing tools
def draw_keyframing_tools(context, layout):
col = layout.column(align=True)
@@ -49,7 +48,6 @@ def draw_keyframing_tools(context, layout):
row.operator("anim.keyframe_insert_menu", text="Insert")
row.operator("anim.keyframe_delete_v3d", text="Remove")
-
# Grease Pencil tools
def draw_gpencil_tools(context, layout):
col = layout.column(align=True)
@@ -69,12 +67,12 @@ def draw_gpencil_tools(context, layout):
col.operator("view3d.ruler")
-
# ********** default tools for object-mode ****************
-class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
+class VIEW3D_PT_tools_basic(View3DPanel, Panel):
+ bl_category = "Basic"
bl_context = "objectmode"
- bl_label = "Object Tools"
+ bl_label = "Basic"
def draw(self, context):
layout = self.layout
@@ -84,25 +82,36 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
col.operator("transform.translate")
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
-
- col = layout.column(align=True)
- col.operator("object.origin_set", text="Origin")
-
- col = layout.column(align=True)
- col.label(text="Object:")
- col.operator("object.duplicate_move", text="Duplicate")
- col.operator("object.delete")
- col.operator("object.join")
-
+
active_object = context.active_object
if active_object and active_object.type in {'MESH', 'CURVE', 'SURFACE'}:
col = layout.column(align=True)
+ col.label(text="Object:")
+ col.operator("object.join")
+ col.operator("object.duplicate_move", text="Duplicate")
+ col.operator("object.duplicate_move_linked", text="Duplicate Linked")
+ col.operator("object.delete")
+
+ col = layout.column(align=True)
+ col.operator("object.origin_set", text="Origin")
+
+ col = layout.column(align=True)
col.label(text="Shading:")
row = col.row(align=True)
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"
+ bl_label = "Animation"
+
+ def draw(self, context):
+ layout = self.layout
+
+ col = layout.column(align=True)
+
draw_keyframing_tools(context, layout)
col = layout.column(align=True)
@@ -111,15 +120,10 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
row.operator("object.paths_calculate", text="Calculate")
row.operator("object.paths_clear", text="Clear")
- draw_repeat_tools(context, layout)
-
- draw_gpencil_tools(context, layout)
-
-
class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
+ bl_category = "Physics"
bl_context = "objectmode"
bl_label = "Rigid Body Tools"
- bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@@ -142,8 +146,26 @@ class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
col.label(text="Constraints:")
col.operator("rigidbody.connect", text="Connect")
-# ********** default tools for editmode_mesh ****************
+# Grease Pencil tools
+class VIEW3D_PT_tools_greasepencil(View3DPanel, Panel):
+ bl_category = "Grease Pencil"
+ bl_label = "Grease Pencil"
+
+ def draw(self, context):
+ layout = self.layout
+ draw_gpencil_tools(context, layout)
+
+class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
+ bl_category = "History"
+ bl_context = "objectmode"
+ bl_label = "History"
+ def draw(self, context):
+ layout = self.layout
+
+ draw_repeat_tools(context, layout)
+
+# ********** default tools for editmode_mesh ****************
class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
bl_context = "mesh_edit"