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-03-28 16:20:57 +0300
committerJoshua Leung <aligorith@gmail.com>2015-03-28 16:20:57 +0300
commit0c5d0422b4fb8b058826db9a7b0f11868aedaa0d (patch)
treeb3e65fa76150125785837ec43c68808045a08da6 /source/blender/editors/space_action/action_edit.c
parent0ffd7f721e8066545e45ea2eb2766d1186cd2abb (diff)
NLA Strip Keyframes: Insert keyframe tools in Anim Editors work now
* Insert Keyframe tool for Dopesheet/Graph Editors needed to be modified to not try to resolve the paths for NLA Control Curves * For now, the poll callback to get the "Active FCurve" also works when given a NLA control curve. They're really the same in most cases, and this should be fine until one of the channels does something funky.
Diffstat (limited to 'source/blender/editors/space_action/action_edit.c')
-rw-r--r--source/blender/editors/space_action/action_edit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 0c2575e19f0..740992a3ad4 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1082,8 +1082,13 @@ static void insert_action_keys(bAnimContext *ac, short mode)
else
cfra = (float)CFRA;
- /* if there's an id */
- if (ale->id)
+ /* read value from property the F-Curve represents, or from the curve only?
+ * - ale->id != NULL: Typically, this means that we have enough info to try resolving the path
+ * - ale->owner != NULL: If this is set, then the path may not be resolvable from the ID alone,
+ * so it's easier for now to just read the F-Curve directly.
+ * (TODO: add the full-blown PointerRNA relative parsing case here...)
+ */
+ if (ale->id && !ale->owner)
insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
else
insert_vert_fcurve(fcu, cfra, fcu->curval, 0);