Page MenuHome

Refactor: NLA Prep for D8296
AbandonedPublic

Authored by Wayde Moss (GuiltyGhost) on Oct 17 2020, 10:14 PM.

Details

Summary

No intended functional changes.

This is the refactor of NLA evaluation to prepare for D8296: Feature: NLA: Evaluate Whole NLA Stack in Tweak Mode. I was using TortoiseGitMerge to look at the diff to try to make the diff more readable.. but it looks like arcanist(?)/this-site uses a different method.

Refactor notes

  • generally, functions not shuffled around so diffs are clearer
  • in (anim_sys.c) nlaeval_blend_value(), the bitmap writes to NlaEvalChannel->valid are unused and redundant so they're removed.
  • renames NlaEvalChannel->valid to NlaEvalChannel->domain for term consistency with usage
  • for blending functions, more descriptive names used and float equality checks changed to use IS_EQF() instead of ==.
  • (anim_sys.c) animsys_evaluate_nla() separated into for_flush and for_keyframing variants to reduce complexity by making the use clear.
    • the dummy strip creation has been refactored to two separate functions for the tweak strip and nonpushed action strip. Both are evaluated differently from other strips and eachother. There's no need to interweave them. A future patch D8296: Feature: NLA: Evaluate Whole NLA Stack in Tweak Mode generally requires both strips.
  • XXX (anim_sys.c) nlatrack_find_tweaked() is a work around and temporary. If anyone has any insight into this problem, help is appreciated.
  • (anim_sys.c) nonstrip_action_fill_strip_data() doesn't call nlastrips_ctime_get_strip() due to a future patch D8867: Feature: NLA Merge Strips needs to call the latter N times but the former only needs to be called once.
  • (anim_sys.c) BKE_is_nlatrack_evaluatable() is an API function so a future patch D8867: Feature: NLA Merge Strips can access it.
  • (anim_sys.c) BKE_animsys_nla_remap_keyframe_values() removed full replace strip early out. Future patch D8296: Feature: NLA: Evaluate Whole NLA Stack in Tweak Mode can't use it.
  • add const, limited to refactored areas
  • remove redundant switch-case fall throughs to default
  • nlaeval_blend_flush() small refactor, replace branching with assertion
  • return value of nla_combine_quaternion_invert_get_fcurve_values() implemented to handle case where influence == 0. This failure case added to other blend inversions too. The Nla remap function (anim_sys.c) BKE_animsys_nla_remap_keyframe_values() does this check but future patch D8867: Feature: NLA Merge Strips will not use the remap function directly.

Diff Detail

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

Event Timeline

Wayde Moss (GuiltyGhost) requested review of this revision.Oct 17 2020, 10:14 PM
Wayde Moss (GuiltyGhost) created this revision.
Wayde Moss (GuiltyGhost) retitled this revision from Feature: NLA Merge Strips to Refactor: NLA Prep for D8296.Oct 17 2020, 10:29 PM
Wayde Moss (GuiltyGhost) edited the summary of this revision. (Show Details)
Wayde Moss (GuiltyGhost) edited the summary of this revision. (Show Details)
  • - remove unnecessary condition
  • - remove accidental additional parameter for function call
  • forgot to rebase last time

Abandon reason: split off into smaller patches.