diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-01-18 09:00:17 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-01-18 09:41:59 +0300 |
commit | 65ec429d1176404fcedd0dc29c03476972ab303f (patch) | |
tree | 16bfa75d52d5483ee2f25f53c40f67642c04a7b6 /release/scripts/startup | |
parent | 224ae234439727628ec5c260d1fd4e22e6566e29 (diff) |
GP Interpolate Sequence: Tool settings for controlling the shape of interpolation
This commit introduces the ability to use the Robert Penner easing equations
or a Custom Curve to control the way that the "Interpolate Sequence" operator
interpolates between keyframes. Previously, it was only possible to get linear
interpolation between the gp frames.
Workflow:
1) Place current frame between a pair of GP keyframes
2) Open the "Interpolate" panel in the Toolshelf
3) Choose the interpolation type (under "Sequence Options")
4) Adjust settings (e.g. if you're using "Custom Curve", use the curvemap widget
to define the way that the interpolation proceeds)
5) Click "Sequence" to interpolate
6) Play back/scrub the animation to see if you've got the result you want
7) If you need to make some tweaks, undo, or delete the generated keyframes,
then repeat the process again from step 4 until you've got the desired result.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 19 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 6 |
2 files changed, 24 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index c43f56acb37..1f06b202adc 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -244,8 +244,8 @@ class GreasePencilStrokeEditPanel: layout.separator() layout.operator("gpencil.reproject") + class GreasePencilInterpolatePanel: - # subclass must set bl_space_type = 'VIEW_3D' bl_label = "Interpolate..." bl_category = "Grease Pencil" @@ -273,6 +273,23 @@ class GreasePencilInterpolatePanel: col.prop(settings, "interpolate_all_layers") col.prop(settings, "interpolate_selected_only") + col = layout.column(align=True) + col.label(text="Sequence Options:") + col.prop(settings, "type") + if settings.type == 'CUSTOM': + box = layout.box() + # TODO: Options for loading/saving curve presets? + box.template_curve_mapping(settings, "interpolation_curve", brush=True) + elif settings.type != 'LINEAR': + col.prop(settings, "easing") + + if settings.type == 'BACK': + layout.prop(settings, "back") + elif setting.type == 'ELASTIC': + sub = layout.column(align=True) + sub.prop(settings, "amplitude") + sub.prop(settings, "period") + class GreasePencilBrushPanel: # subclass must set diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 3eb76a3b0f9..60e86d7544d 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -22,6 +22,7 @@ from bpy.types import Menu, Panel, UIList from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, + GreasePencilInterpolatePanel, GreasePencilStrokeSculptPanel, GreasePencilBrushPanel, GreasePencilBrushCurvesPanel @@ -1963,6 +1964,11 @@ class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): bl_space_type = 'VIEW_3D' +# Grease Pencil stroke interpolation tools +class VIEW3D_PT_tools_grease_pencil_interpolate(GreasePencilInterpolatePanel, Panel): + bl_space_type = 'VIEW_3D' + + # Grease Pencil stroke sculpting tools class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'VIEW_3D' |