Page MenuHome

Nla Refactor: Better blend function parm naming
ClosedPublic

Authored by Wayde Moss (GuiltyGhost) on Dec 1 2020, 12:54 PM.

Details

Summary

Renames parms:

old namenew name
old_valuelower_value
target_valueblended_value
valuestrip_value
infinfluence

Reason: D8296: Feature: NLA: Evaluate Whole NLA Stack in Tweak Mode allows full nla stack evaluation with proper keyframing support. These names should make it more intuitive how all the data gets processed and inverted. Note, that I do use the term "strip_value" instead of something like "fcurve_value" of the tweak strip. Technically, "strip_value" is closer to what is solved for. For example, if a noise fmodifier was active for the fcurve, then the remapping would appear to be wrong. In the future, further solving can be done afterward, outside of the nla system, to remove the effects of fmodifiers.


Renames functions:

nla_invert_blend_valuenla_blend_get_inverted_strip_value
nla_invert_combine_valuenla_combine_get_inverted_strip_value

Reason: D8296 adds invert_get_lower_value() variants, so "invert" alone is too vague.


Renames NlaKeyframingContext member:

nla_channelslower_eval_data

Reason: D8296 evaluates the upper stack. This name makes it more obvious what data is stored there.

No functional changes (relative to the dependency below)
Split from D9247: Refactor: NLA Prep for D8296
Depends on D9694: Nla Refactor: Blend functions explicit Div0 check since the code was so close to eachother.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D9695 (branched from master)
Build Status
Buildable 11635
Build 11635: arc lint + arc unit

Event Timeline

Wayde Moss (GuiltyGhost) requested review of this revision.Dec 1 2020, 12:54 PM

Nice work, and thanks for describing the motivation so clearly in the patch description.

I'm not yet convinced of the nla_blend_value_invert_get_strip_value and nla_combine_value_invert_get_strip_value names. "Invert" is a verb, which implies an action. I would expect an "invert" function to modify (invert) some data in place, whereas an "inverted" function would return the inverted data.

How about nla_blend_get_inverted_strip_value and nla_combine_get_inverted_strip_value?

  • apply review note: rename nla_blend_value_invert_get_strip_value to nla_blend_get_inverted_strip_value and apply to other blend functions too.
This revision is now accepted and ready to land.Dec 14 2020, 3:19 PM
  • minor cleanup after rebase

This update is out of habit. I'll push to master in a sec.