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:
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user