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:
authorCampbell Barton <ideasman42@gmail.com>2014-02-28 10:37:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-28 10:39:40 +0400
commit0bfd75aa1453e01c577e055b80abc869cbe6abcd (patch)
tree4c6966ca501f6d53b2f6c6abcd53ebbc9ba6d225
parent32d5cc247fc1cf9a71492a26cebf99f9505bb82a (diff)
Fix T38883: Toolbar origin buttons missing for armature
Also allow mirror for any object type
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 766a8ebf70f..618b82cc024 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -67,11 +67,8 @@ class VIEW3D_PT_tools_transform(View3DPanel, Panel):
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
- active_object = context.active_object
- if active_object and active_object.type in {'MESH', 'CURVE', 'SURFACE'}:
-
- col = layout.column(align=True)
- col.operator("transform.mirror", text="Mirror")
+ col = layout.column(align=True)
+ col.operator("transform.mirror", text="Mirror")
class VIEW3D_PT_tools_object(View3DPanel, Panel):
@@ -86,23 +83,26 @@ class VIEW3D_PT_tools_object(View3DPanel, Panel):
col.operator("object.duplicate_move", text="Duplicate")
col.operator("object.duplicate_move_linked", text="Duplicate Linked")
- active_object = context.active_object
- if active_object and active_object.type in {'MESH', 'CURVE', 'SURFACE'}:
- col = layout.column(align=True)
- col.operator("object.join")
col.operator("object.delete")
- col = layout.column(align=True)
- if active_object and active_object.type in {'MESH', 'CURVE', 'SURFACE'}:
+ obj = context.active_object
+ if obj:
+ obj_type = obj.type
- col = layout.column(align=True)
- col.operator("object.origin_set", text="Set Origin")
+ if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE'}:
+ col = layout.column(align=True)
+ col.operator("object.join")
- 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")
+ if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE', 'FONT', 'LATTICE'}:
+ col = layout.column(align=True)
+ col.operator_menu_enum("object.origin_set", "type", text="Set Origin")
+
+ if obj_type in {'MESH', 'CURVE', 'SURFACE'}:
+ 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_objectmode(View3DPanel, Panel):