From 101fadcf6b93c1388c4e4b5ccf0f0efcdc7a058d Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 17 Dec 2021 12:29:54 +0100 Subject: 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 --- release/scripts/startup/bl_ui/properties_animviz.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'release') 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: -- cgit v1.2.3