diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-18 07:15:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-18 07:15:43 +0300 |
commit | 4719e7ec7a9c3095117bd2b0b08aeb1d72c62d98 (patch) | |
tree | cdb17c0cd29f445d67cfbbe0fa29eec981c85197 | |
parent | dcb44ddea2b6ca663b9a1b63b151d43973b6ff24 (diff) |
UI: motion paths panel layout tweak
- User better alignment for the paths_range_update button.
- Use Flow layout for the Display sub-panel items.
-rw-r--r-- | release/scripts/startup/bl_ui/properties_animviz.py | 37 |
1 files changed, 20 insertions, 17 deletions
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) |