Proportional editing support for the action editor.

There are a few things here which are not so nice:

* Position of proportional edit circle is not centered on data
(difficult to predict positions here since those are completely custom,
 will probably be positioned at center of area later instead)

* Result is flushed to curve handles only at the end of the transform,
so if people have the graph editor open they will see handles lagging behind.
This commit is contained in:
Antony Riakiotakis
2015-04-07 16:45:29 +02:00
parent 662c2cd910
commit c1e5d966c6
6 changed files with 211 additions and 53 deletions

View File

@@ -105,6 +105,7 @@ class DOPESHEET_HT_header(Header):
layout = self.layout
st = context.space_data
toolsettings = context.tool_settings
row = layout.row(align=True)
row.template_header()
@@ -133,6 +134,11 @@ class DOPESHEET_HT_header(Header):
# filters which will work here and are useful (especially for character animation)
dopesheet_filter(layout, context, genericFiltersOnly=True)
row = layout.row(align=True)
row.prop(toolsettings, "proportional_edit", icon_only=True)
if toolsettings.proportional_edit != 'DISABLED':
row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
# Grease Pencil mode doesn't need snapping, as it's frame-aligned only
if st.mode != 'GPENCIL':
layout.prop(st, "auto_snap", text="")