[Bf-blender-cvs] [4719e7ec7a9] master: UI: motion paths panel layout tweak
Campbell Barton
noreply at git.blender.org
Mon Feb 18 05:17:05 CET 2019
Commit: 4719e7ec7a9c3095117bd2b0b08aeb1d72c62d98
Author: Campbell Barton
Date: Mon Feb 18 15:15:43 2019 +1100
Branches: master
https://developer.blender.org/rB4719e7ec7a9c3095117bd2b0b08aeb1d72c62d98
UI: motion paths panel layout tweak
- User better alignment for the paths_range_update button.
- Use Flow layout for the Display sub-panel items.
===================================================================
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 4ee721b0175..54a1fb71a2b 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -40,7 +40,14 @@ class MotionPathButtonsPanel:
layout.use_property_split = True
layout.use_property_decorate = False
- layout.prop(mps, "type")
+ row = layout.row(align=True)
+ row.prop(mps, "type")
+ if mps.type == 'RANGE':
+ if bones:
+ row.operator("pose.paths_range_update", text="", icon='TIME')
+ else:
+ row.operator("object.paths_range_update", text="", icon='TIME')
+
if mps.type == 'CURRENT_FRAME':
col = layout.column(align=True)
@@ -48,17 +55,10 @@ class MotionPathButtonsPanel:
col.prop(mps, "frame_after", text="After")
col.prop(mps, "frame_step", text="Step")
elif mps.type == 'RANGE':
- row = layout.row()
- sub = row.column()
- if mps.type == 'RANGE':
- if bones:
- sub.operator("pose.paths_range_update", text="", icon='TIME')
- else:
- sub.operator("object.paths_range_update", text="", icon='TIME')
- sub = row.column(align=True)
- sub.prop(mps, "frame_start", text="Frame Range Start")
- sub.prop(mps, "frame_end", text="End")
- sub.prop(mps, "frame_step", text="Step")
+ col = layout.column(align=True)
+ col.prop(mps, "frame_start", text="Frame Range Start")
+ col.prop(mps, "frame_end", text="End")
+ col.prop(mps, "frame_step", text="Step")
if mpath:
col = layout.column(align=True)
@@ -98,10 +98,11 @@ class MotionPathButtonsPanel_display:
layout.use_property_split = True
layout.use_property_decorate = False
- col = layout.column()
- col.prop(mps, "show_frame_numbers", text="Frame Numbers")
- col.prop(mps, "show_keyframe_highlight", text="Keyframes")
- sub = col.column()
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=True)
+
+ flow.prop(mps, "show_frame_numbers", text="Frame Numbers")
+ flow.prop(mps, "show_keyframe_highlight", text="Keyframes")
+ sub = flow.column()
sub.enabled = mps.show_keyframe_highlight
if bones:
sub.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
@@ -109,7 +110,9 @@ class MotionPathButtonsPanel_display:
# Customize path
if mpath is not None:
- col.prop(mpath, "lines", text="Lines")
+ flow.prop(mpath, "lines", text="Lines")
+
+ col = layout.column()
col.prop(mpath, "line_thickness", text="Thickness")
split = col.split(factor=0.6)
More information about the Bf-blender-cvs
mailing list