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-12-23 18:43:01 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-01-14 19:14:28 +0300
commitde1d3e5f5f4029be03195227197de1c42720f958 (patch)
treed4b9f2e022af1c864bb6c82e143a6d28da423f01 /source/blender/makesrna/intern/rna_nla.c
parent9c1a961dc423d2eb19b875564bb4bb3c0b297ca5 (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/makesrna/intern/rna_nla.c')
-rw-r--r--source/blender/makesrna/intern/rna_nla.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 7b5b2f13eef..ceedb5078a2 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -488,7 +488,11 @@ static void rna_NlaTrack_solo_set(PointerRNA *ptr, bool value)
/* enum defines exported for rna_animation.c */
const EnumPropertyItem rna_enum_nla_mode_blend_items[] = {
{NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace",
- "Result strip replaces the accumulated results by amount specified by influence"},
+ "The strip values replace the accumulated results by amount specified by influence"},
+ {NLASTRIP_MODE_COMBINE, "COMBINE", 0, "Combine",
+ "The strip values are combined with accumulated results by appropriately using addition, "
+ "multiplication, or quaternion math, based on channel type"},
+ {0, "", 0, NULL, NULL},
{NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumulated results"},
{NLASTRIP_MODE_SUBTRACT, "SUBTRACT", 0, "Subtract",
"Weighted result of strip is removed from the accumulated results"},