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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-02-27 15:17:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-02-27 15:20:43 +0300
commiteb9d48825144303c9e5b32b678120ce2c6d3d365 (patch)
tree9c77007cfbda678f66cb880e52dfd22d489eaf10 /release
parent3fcd638bebafbdc58bda0a0b83efb7b61cfdf850 (diff)
Fix T47596: Bone motion path - confusing UI in 3DView tools.
Now using same UI as in object/armature properties, also save one line in 3DView panesl. ;) Nothing crucial there, but nice & safe to backport to 2.77 imho.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 691db5aa93c..ef65ece9aa9 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -242,14 +242,19 @@ class VIEW3D_PT_tools_animation(View3DPanel, Panel):
def draw(self, context):
layout = self.layout
+ ob = context.active_object
+ mpath = ob.motion_path if ob else None
+
draw_keyframing_tools(context, layout)
col = layout.column(align=True)
col.label(text="Motion Paths:")
- row = col.row(align=True)
- row.operator("object.paths_calculate", text="Calculate")
- row.operator("object.paths_clear", text="Clear")
- col.operator("object.paths_update", text="Update")
+ if mpath:
+ row = col.row(align=True)
+ row.operator("object.paths_update", text="Update")
+ row.operator("object.paths_clear", text="", icon='X')
+ else:
+ col.operator("object.paths_calculate", text="Calculate")
col.separator()
@@ -771,12 +776,17 @@ class VIEW3D_PT_tools_posemode(View3DPanel, Panel):
draw_keyframing_tools(context, layout)
+ pchan = context.active_pose_bone
+ mpath = pchan.motion_path if pchan else None
+
col = layout.column(align=True)
col.label(text="Motion Paths:")
- row = col.row(align=True)
- row.operator("pose.paths_calculate", text="Calculate")
- row.operator("pose.paths_clear", text="Clear")
- col.operator("pose.paths_update", text="Update")
+ if mpath:
+ row = col.row(align=True)
+ row.operator("pose.paths_update", text="Update")
+ row.operator("pose.paths_clear", text="", icon='X')
+ else:
+ col.operator("pose.paths_calculate", text="Calculate")
class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):