diff options
author | William Reynish <billreynish> | 2018-09-26 18:32:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-26 19:24:09 +0300 |
commit | b2a569dd68357e535c79c8a4a74947773f21023f (patch) | |
tree | 5596db26f635dad645129f8682aa908857498eb8 /release/scripts/startup/bl_ui/space_graph.py | |
parent | c0b9a4a86ef7dfc42cb7542cea6ab5ba472f5884 (diff) |
UI: use pie menu for snap, pivot and proportional editing.
* Proportional pie menu at shift+O.
* Snap pie menu at shift+S.
* Pivot pie menu at comma. Previous comma, ctrl+comma, period
and ctrl+period shortcuts for specific pivot types were removed.
Ref T56881.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_graph.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 9b3708ce5b1..78da2215be0 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -354,6 +354,33 @@ class GRAPH_MT_specials(Menu): layout.operator_menu_enum("graph.snap", "type", text="Snap") +class GRAPH_MT_pivot_pie(Menu): + bl_label = "Pivot Point" + + def draw(self, context): + layout = self.layout + pie = layout.menu_pie() + + pie.prop_enum(context.space_data, "pivot_point", value='BOUNDING_BOX_CENTER') + pie.prop_enum(context.space_data, "pivot_point", value='CURSOR') + pie.prop_enum(context.space_data, "pivot_point", value='INDIVIDUAL_ORIGINS') + + +class GRAPH_MT_snap_pie(Menu): + bl_label = "Snap" + + def draw(self, context): + layout = self.layout + pie = layout.menu_pie() + + pie.operator("graph.snap", text="Current Frame").type = 'CFRA' + pie.operator("graph.snap", text="Cursor Value").type = 'VALUE' + pie.operator("graph.snap", text="Nearest Frame").type = 'NEAREST_FRAME' + pie.operator("graph.snap", text="Nearest Second").type = 'NEAREST_SECOND' + pie.operator("graph.snap", text="Nearest Marker").type = 'NEAREST_MARKER' + pie.operator("graph.snap", text="Flatten Handles").type = 'HORIZONTAL' + + class GRAPH_MT_channel_specials(Menu): bl_label = "F-Curve Channel Context Menu" @@ -407,6 +434,8 @@ classes = ( GRAPH_MT_delete, GRAPH_MT_specials, GRAPH_MT_channel_specials, + GRAPH_MT_pivot_pie, + GRAPH_MT_snap_pie, GRAPH_PT_filters, ) |