1
1

NLA: when searching for active track/strip, shortcut when none is active

In the `update_active_track()` function, add a shortcut that just sets
`NULL`, instead of searching for `NULL` pointers. Should give a tiny
speedup.
This commit is contained in:
2022-06-21 15:27:22 +02:00
parent 15bc3d260d
commit 7f3af2aaee

View File

@@ -303,6 +303,12 @@ static void update_active_strip(AnimData *adt_dest,
/* Set adt_dest->act_track to the track with the same index as adt_source->act_track. */
static void update_active_track(AnimData *adt_dest, const AnimData *adt_source)
{
adt_dest->act_track = NULL;
adt_dest->actstrip = NULL;
if (adt_source->act_track == NULL && adt_source->actstrip == NULL) {
return;
}
BLI_assert(BLI_listbase_count(&adt_source->nla_tracks) ==
BLI_listbase_count(&adt_dest->nla_tracks));