Fix #100718: NLA Hold Forward Inconsistency #107281

Closed
Wayde Moss wants to merge 2 commits from wbmoss_dev/blender:pr_fix_100718_NLA_Hold_Forward_Inconsistency into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

2 Commits

Author SHA1 Message Date
Wayde Moss f03415f699 Cleanup: remove unnecessary conditional
Part of prior commit 6716fbed37 which
makes the condition redundant.
2023-05-23 01:41:19 -04:00
Wayde Moss 6716fbed37 Fix #100718: NLA Hold Forward Inconsistency
Problem:
For the Action Track, 'extrapolation=Hold Forward' behaves the same as
'Hold'. Animators expect 'Hold Forward' to behave consistently with the
rest of the NLA system but it does not.

Source of the problem:
Pre-patch, the problematic behavior was implemented as a special case
(see: animsys_create_action_track_strip() in anim_sys.c). It was added
added by commit 2826c2be54. The fix
effectively removes the special handling while keeping the core intent
of the original commit, to have the Action Track evaluate fcurve
extrapolation properly.

Solution:
For the Action Track, we now properly treat extrapolation Hold_Forward
just like the rest of the NLA system (strips): as bounded on the left
and infinite on the right. In (anim_sys.c) nlastrips_ctime_get_strip(),
an additional boundary check is required since the original commit
assumed the only possible case, when NLASTRIP_FLAG_NO_TIME_MAP is
enabled, is effectively extrapolation=HOLD.
2023-05-23 00:39:16 -04:00