Commit: 101fadcf6b93c1388c4e4b5ccf0f0efcdc7a058d
Author: Dalai Felinto
Date:   Fri Dec 17 12:29:54 2021 +0100
Branches: master
https://developer.blender.org/rB101fadcf6b93c1388c4e4b5ccf0f0efcdc7a058d

Motion Path: Tweak the User Interface

This moves the clear paths button ("X") to the same line of "Update All Paths",
and make it visible at all times.

1. The clear button affects all objects (by default). However the
Calculate/Update Paths only works on the selected objects/objects.
Better to not have them both on the same line.

2. The operator to clear object and pose paths can run even if the active
object/bone has no motion path. However the UI was not showing the button in
those cases.

Before:
{F12757500, size=full}

After:
{F12757502, size=full}

Differential Revision: https://developer.blender.org/D13609

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_animviz.py 
b/release/scripts/startup/bl_ui/properties_animviz.py
index 44965a60489..28e456d023d 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -70,14 +70,10 @@ class MotionPathButtonsPanel:
 
             col = layout.column(align=True)
 
-            row = col.row(align=True)
             if bones:
-                row.operator("pose.paths_update", text="Update Paths", 
icon='BONE_DATA')
-                row.operator("pose.paths_clear", text="", icon='X')
+                col.operator("pose.paths_update", text="Update Paths", 
icon='BONE_DATA')
             else:
-                row.operator("object.paths_update", text="Update Paths", 
icon='OBJECT_DATA')
-                row.operator("object.paths_clear", text="", icon='X')
-            col.operator("object.paths_update_visible", text="Update All 
Paths", icon='WORLD')
+                col.operator("object.paths_update", text="Update Paths", 
icon='OBJECT_DATA')
         else:
             col = layout.column(align=True)
             col.label(text="Nothing to show yet...", icon='ERROR')
@@ -86,7 +82,13 @@ class MotionPathButtonsPanel:
                 col.operator("pose.paths_calculate", text="Calculate...", 
icon='BONE_DATA')
             else:
                 col.operator("object.paths_calculate", text="Calculate...", 
icon='OBJECT_DATA')
-            col.operator("object.paths_update_visible", text="Update All 
Paths", icon='WORLD')
+
+        row = col.row(align=True)
+        row.operator("object.paths_update_visible", text="Update All Paths", 
icon='WORLD')
+        if bones:
+            row.operator("pose.paths_clear", text="", icon='X')
+        else:
+            row.operator("object.paths_clear", text="", icon='X')
 
 
 class MotionPathButtonsPanel_display:

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to