diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-11 01:10:28 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-11 01:10:28 +0300 |
commit | cf25b10eb5bb61662ce0db6b3ef54a3e3e73a328 (patch) | |
tree | 0d7ffcdd0735d1788bfb3e679b6f7489605c1aab /source/blender/editors/space_action/action_edit.c | |
parent | d841a206314922eec0a0fed0b87e3078b68487c9 (diff) |
Todo #22395: Restoring Grease Pencil Editing Mode in DopeSheet Editor
This commit restores some basic functionality for retiming Grease
Pencil sketches. Some of the functionality that existed before still
hasn't been restored (namely snap/mirror tools as well as copy+paste),
though it should be possible to use this for basic retiming and
sketch-frame management again.
- There's still a lot of work required to get this up to the standard
of the rest of the animation editor code, as some of this code was
originally just hacked in based on the old-style code.
- Work is already required to not have to directly access the main db
global to get the list of Grease Pencil datablocks to show, but that
can come along with pending cleanups of the filtering code.
Diffstat (limited to 'source/blender/editors/space_action/action_edit.c')
-rw-r--r-- | source/blender/editors/space_action/action_edit.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index c97ed67a45b..888c372f555 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -38,6 +38,7 @@ #include "BLI_utildefines.h" #include "DNA_anim_types.h" +#include "DNA_gpencil_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -54,6 +55,7 @@ #include "UI_view2d.h" #include "ED_anim_api.h" +#include "ED_gpencil.h" #include "ED_keyframing.h" #include "ED_keyframes_edit.h" #include "ED_screen.h" @@ -522,10 +524,10 @@ static void duplicate_action_keys (bAnimContext *ac) /* loop through filtered data and delete selected keys */ for (ale= anim_data.first; ale; ale= ale->next) { - //if (ale->type == ANIMTYPE_GPLAYER) - // delete_gplayer_frames((bGPDlayer *)ale->data); - //else + if (ale->type == ANIMTYPE_FCURVE) duplicate_fcurve_keys((FCurve *)ale->key_data); + else + duplicate_gplayer_frames((bGPDlayer *)ale->data); } /* free filtered list */ @@ -611,8 +613,8 @@ static void delete_action_keys (bAnimContext *ac) if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0)) ANIM_fcurve_delete_from_animdata(ac, adt, fcu); } - //else - // delete_gplayer_frames((bGPDlayer *)ale->data); + else + delete_gplayer_frames((bGPDlayer *)ale->data); } /* free filtered list */ |