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_graph/graph_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_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 2944901663b..559eec8fe48 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -498,12 +498,17 @@ static void insert_graph_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);
-
+
ale->update |= ANIM_UPDATE_DEFAULT;
}
@@ -596,12 +601,12 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
/* insert keyframe on the specified frame + value */
insert_vert_fcurve(fcu, frame, val, 0);
-
+
ale->update |= ANIM_UPDATE_DEPS;
-
+
BLI_listbase_clear(&anim_data);
BLI_addtail(&anim_data, ale);
-
+
ANIM_animdata_update(&ac, &anim_data);
}
else {