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:
authorWayde Moss <GuiltyGhost>2021-02-17 07:58:29 +0300
committerWayde Moss <wbmoss_dev@yahoo.com>2021-02-17 08:21:07 +0300
commitc48360c2559acbe1cb8014ca0e81152f2febf199 (patch)
treedea8ef01dfe70cc0d6ea330bd0e15d44bd1e130d /source/blender/blenkernel/nla_private.h
parent585db47d992700698cedc3e8eee03df92d067833 (diff)
Fix: NLA Blends Non-Animated Upper Channel Values
Issue introduced by my commit: rB40b7929cc040 **User-level Problem**: The issue resulted in a full-replace upper strip with only a Z location channel full-replacing the XY location channels of the lower stack. replaced to default. The expected behavior is that only the Z location channel is affected. **Technical-level Problem**: Before the problematic commit, fcurves were blended as they were read. So only existing animated channels would blend. My recent commit changed the process to read all fcurve values into an isolated upper_snapshot then blend with the lower stack. There is no data stored to know whether the upper snapshot channel values were sampled from fcurves or were default values. Only those sampled from fcurves should be blended. **Solution**: Added a `blend_domain` bitmask member to NlaEvalChannelSnapshot. The blending function only blends values within the `blend_domain`. Sampled fcurve values are now marked as within the `blend_domain`. We also now always copy the lower snapshot to the result snapshot which only matters when they aren't the same. Currently, it's always the same so the change is more for future unseen cases. Reviewed By: sybren, #animation_rigging Differential Revision: https://developer.blender.org/D10339
Diffstat (limited to 'source/blender/blenkernel/nla_private.h')
-rw-r--r--source/blender/blenkernel/nla_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h
index 79c16e321be..706bcac4f17 100644
--- a/source/blender/blenkernel/nla_private.h
+++ b/source/blender/blenkernel/nla_private.h
@@ -79,6 +79,9 @@ typedef struct NlaValidMask {
typedef struct NlaEvalChannelSnapshot {
struct NlaEvalChannel *channel;
+ /** For an upper snapshot channel, marks values that should be blended. */
+ NlaValidMask blend_domain;
+
int length; /* Number of values in the property. */
bool is_base; /* Base snapshot of the channel. */
@@ -182,6 +185,8 @@ void nladata_flush_channels(PointerRNA *ptr,
NlaEvalSnapshot *snapshot,
const bool flush_to_original);
+void nlasnapshot_enable_all_blend_domain(NlaEvalSnapshot *snapshot);
+
void nlasnapshot_ensure_channels(NlaEvalData *eval_data, NlaEvalSnapshot *snapshot);
void nlasnapshot_blend(NlaEvalData *eval_data,