[Bf-blender-cvs] [61e8482] blender-v2.77-release: Fix T47596: Bone motion path - confusing UI in 3DView tools.

Bastien Montagne noreply at git.blender.org
Fri Mar 4 17:35:39 CET 2016


Commit: 61e848280e4e672cddb46881c51817bdf4840049
Author: Bastien Montagne
Date:   Sat Feb 27 13:17:38 2016 +0100
Branches: blender-v2.77-release
https://developer.blender.org/rB61e848280e4e672cddb46881c51817bdf4840049

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.

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

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 691db5a..ef65ece 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):




More information about the Bf-blender-cvs mailing list