Page MenuHome

Drawing NLA action background based on action's extrapolation type
ClosedPublic

Authored by Nate Rupsis (nrupsis) on May 4 2022, 2:44 AM.

Details

Summary

Previously, the extrapolation type's for an NLA action had no visual indicator. "Hold", "Hold Forward", and "Nothing" were visually indistinguishable.

Old:

New:

NLA's background now render's based on extrapolation type to give visual separation.

Diff Detail

Repository
rB Blender
Branch
T97572 (branched from master)
Build Status
Buildable 21950
Build 21950: arc lint + arc unit

Event Timeline

Nate Rupsis (nrupsis) requested review of this revision.May 4 2022, 2:44 AM
Nate Rupsis (nrupsis) created this revision.
Nate Rupsis (nrupsis) retitled this revision from POC getting action strip to draw based on extrapolation type to Drawing NLA action background based on action's extrapolation type.May 4 2022, 2:53 AM
Nate Rupsis (nrupsis) edited the summary of this revision. (Show Details)
Nate Rupsis (nrupsis) removed 1 blocking reviewer(s): Sybren A. Stüvel (sybren).
Colin Basnett (cmbasnett) requested changes to this revision.May 4 2022, 5:01 AM
Colin Basnett (cmbasnett) added inline comments.
source/blender/editors/space_nla/nla_draw.c
801

This seems a bit excessive to be doing every draw call. That function can run quite deep, and copying a potentially huge array just to discard it all and grab one value from it seems inefficient. Is there a less costly way to get the key range from an action?

This revision now requires changes to proceed.May 4 2022, 5:01 AM
source/blender/editors/space_nla/nla_draw.c
800

This ED_keylist_create needs a corresponding ED_keylist_free, otherwise this will leak memory.

Nate Rupsis (nrupsis) edited the summary of this revision. (Show Details)
  • using BKE_action_get_frame_range to ger frame range

Approved from the artist/animator side, this makes it very clear what the result will be when editing the extrapolation and what it is doing for new keys being created for the action when using the NLA in a layered animation workflow.

This revision is now accepted and ready to land.May 23 2022, 11:25 PM
Sybren A. Stüvel (sybren) requested changes to this revision.Sep 13 2022, 2:39 PM

LGTM, just one small change. Thanks @Colin Basnett (cmbasnett) for helping with the code review!

@Nate Rupsis (nrupsis) Could you replace the video in the description with a simple image, that shows the three extrapolation modes on three NLA tracks? That'll make a nicer one for the release notes/wiki.

source/blender/editors/space_nla/nla_draw.c
809

Remove the default case. That way the compiler can issue a warning when another item in the enum is added.

This revision now requires changes to proceed.Sep 13 2022, 2:39 PM
Nate Rupsis (nrupsis) marked 2 inline comments as done.
  • remove default case for future ENUMS
Nate Rupsis (nrupsis) edited the summary of this revision. (Show Details)Sep 13 2022, 4:58 PM
Nate Rupsis (nrupsis) marked an inline comment as done.
This revision is now accepted and ready to land.Sep 15 2022, 10:46 AM