Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-12-13 16:36:02 +0300
committerJoshua Leung <aligorith@gmail.com>2015-12-13 17:06:50 +0300
commitab0b0efe822e246e8c371e8d9de953ac71201efc (patch)
treeeed20e4deb9ee6afe167d429fdaf86e3f1d7f6c2 /source/blender/editors/space_action
parenta27477b9e8c0b12e3da77aad0cf891d13cdf6a12 (diff)
Dopesheet: Mirroring GPencil keyframes now works again
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index a8cb6150664..42730ff87fc 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1693,16 +1693,21 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
for (ale = anim_data.first; ale; ale = ale->next) {
AnimData *adt = ANIM_nla_mapping_get(ac, ale);
- if (adt) {
+ if (ale->type == ANIMTYPE_GPLAYER) {
+ ED_gplayer_mirror_frames(ale->data, ac->scene, mode);
+ }
+ else if (ale->type == ANIMTYPE_MASKLAYER) {
+ /* TODO */
+ }
+ else if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
- //else if (ale->type == ACTTYPE_GPLAYER)
- // snap_gplayer_frames(ale->data, mode);
- else
+ else {
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
-
+ }
+
ale->update |= ANIM_UPDATE_DEFAULT;
}
@@ -1721,10 +1726,6 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- /* XXX... */
- if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK))
- return OPERATOR_PASS_THROUGH;
-
/* get mirroring mode */
mode = RNA_enum_get(op->ptr, "type");