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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-11-12 19:41:53 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-12-14 22:19:18 +0300
commitde662e7cd3b3ca45c4220e3830c32e2b3496c9fe (patch)
tree79b78cc746c5121ac4c964dffef94d961fd14975 /source/blender/blenkernel/BKE_animsys.h
parentfc74903f272a01784e0376c9ee12c2673017285d (diff)
NLA: insert keyframes correctly for strips with non-Replace mode.
NLA strips support using the keyframe values in a variety of ways: adding, subtracting, multiplying, linearly mixing with the result of strips located below in the stack. This is intended for layering tweaks on top of a base animation. However, when inserting keyframes into such strips, it simply inserts the final value of the property, irrespective of these settings. This in fact makes the feature nearly useless. To fix this it is necessary to evaluate the NLA stack below the edited strip and correctly compute the raw key that would produce the intended final value, according to the mode and influence. Differential Revision: https://developer.blender.org/D3927
Diffstat (limited to 'source/blender/blenkernel/BKE_animsys.h')
-rw-r--r--source/blender/blenkernel/BKE_animsys.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index 43618109e91..f85782d9caa 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -48,6 +48,7 @@ struct Scene;
struct bAction;
struct bActionGroup;
struct bContext;
+struct NlaKeyframingContext;
/* ************************************* */
/* AnimData API */
@@ -171,6 +172,14 @@ void BKE_fcurves_main_cb(struct Main *bmain, ID_FCurve_Edit_Callback func, void
/* ************************************* */
// TODO: overrides, remapping, and path-finding api's
+/* ------------ NLA Keyframing --------------- */
+
+typedef struct NlaKeyframingContext NlaKeyframingContext;
+
+struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, struct Depsgraph *depsgraph, struct PointerRNA *ptr, struct AnimData *adt, float ctime);
+bool BKE_animsys_nla_remap_keyframe_value(struct NlaKeyframingContext *context, struct PointerRNA *prop_ptr, struct PropertyRNA *prop, int index, float *r_value);
+void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache);
+
/* ************************************* */
/* Evaluation API */