diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-23 18:43:01 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-01-14 19:14:28 +0300 |
commit | de1d3e5f5f4029be03195227197de1c42720f958 (patch) | |
tree | d4b9f2e022af1c864bb6c82e143a6d28da423f01 /source/blender/makesdna/DNA_anim_types.h | |
parent | 9c1a961dc423d2eb19b875564bb4bb3c0b297ca5 (diff) |
NLA: implement a new blending mode that intelligently combines actions.
The existing Add and Multiply blending modes have limited usability,
because the appropriate operation for meaningfully combining values
depends on the channel. This adds a new mode that chooses the operation
automatically based on property settings:
- Axis+Angle channels are summed, effectively averaging the
axis, but adding up the angle. Default is forced to 0.
- Quaternion channels use quaternion multiplication:
result = prev * value ^ influence
- Scale-like multiplicative channels use multiplication:
result = prev * (value / default) ^ influence
- Other channels use addition:
result = prev + (value - default) * influence
Inclusion of default in the computation ensures that combining
keyframed default values of properties keeps the default state,
even if the default isn't 0 or 1.
Strips with this mode can be keyframed normally in Tweak mode,
except that for quaternion rotation keyframing always inserts
all 4 channels, and the channel value sliders on the left side
of Graph/Action editors won't insert keys without Auto Key.
Quaternion keys are also automatically normalized.
Differential Revision: https://developer.blender.org/D4190
Diffstat (limited to 'source/blender/makesdna/DNA_anim_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_anim_types.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 15203812b2d..4df9c51609c 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -718,7 +718,8 @@ typedef enum eNlaStrip_Blend_Mode { NLASTRIP_MODE_REPLACE = 0, NLASTRIP_MODE_ADD, NLASTRIP_MODE_SUBTRACT, - NLASTRIP_MODE_MULTIPLY + NLASTRIP_MODE_MULTIPLY, + NLASTRIP_MODE_COMBINE, } eNlaStrip_Blend_Mode; /* NLA Strip Extrpolation Mode */ |