Blender V4.3
nla.cc File Reference
#include <cfloat>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "DNA_sound_types.h"
#include "DNA_speaker_types.h"
#include "BKE_action.hh"
#include "BKE_anim_data.hh"
#include "BKE_fcurve.hh"
#include "BKE_global.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_main.hh"
#include "BKE_nla.hh"
#include "BKE_sound.h"
#include "BLO_read_write.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "ANIM_nla.hh"
#include "nla_private.h"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::nla
 

Macros

#define STASH_TRACK_NAME   DATA_("[Action Stash]")
 

Functions

static void nla_tweakmode_find_active (const ListBase *nla_tracks, NlaTrack **r_track_of_active_strip, NlaStrip **r_active_strip)
 
void BKE_nlastrip_free (NlaStrip *strip, const bool do_id_user)
 
void BKE_nlatrack_free (NlaTrack *nlt, const bool do_id_user)
 
void BKE_nla_tracks_free (ListBase *tracks, bool do_id_user)
 
NlaStripBKE_nlastrip_copy (Main *bmain, NlaStrip *strip, const bool use_same_action, const int flag)
 
NlaTrackBKE_nlatrack_copy (Main *bmain, NlaTrack *nlt, const bool use_same_actions, const int flag)
 
void BKE_nla_tracks_copy (Main *bmain, ListBase *dst, const ListBase *src, const int flag)
 
static NlaStripfind_active_strip_from_listbase (const NlaStrip *active_strip, const ListBase *strips_source, const ListBase *strips_dest)
 
static void update_active_strip (AnimData *adt_dest, NlaTrack *track_dest, const AnimData *adt_source, const NlaTrack *track_source)
 
static void update_active_track (AnimData *adt_dest, const AnimData *adt_source)
 
void BKE_nla_tracks_copy_from_adt (Main *bmain, AnimData *adt_dest, const AnimData *adt_source, const int flag)
 
NlaTrackBKE_nlatrack_new ()
 
void BKE_nlatrack_insert_before (ListBase *nla_tracks, NlaTrack *next, NlaTrack *new_track, bool is_liboverride)
 
void BKE_nlatrack_insert_after (ListBase *nla_tracks, NlaTrack *prev, NlaTrack *new_track, const bool is_liboverride)
 
NlaTrackBKE_nlatrack_new_before (ListBase *nla_tracks, NlaTrack *next, bool is_liboverride)
 
NlaTrackBKE_nlatrack_new_after (ListBase *nla_tracks, NlaTrack *prev, bool is_liboverride)
 
NlaTrackBKE_nlatrack_new_head (ListBase *nla_tracks, bool is_liboverride)
 
NlaTrackBKE_nlatrack_new_tail (ListBase *nla_tracks, const bool is_liboverride)
 
float BKE_nla_clip_length_get_nonzero (const NlaStrip *strip)
 
void BKE_nla_clip_length_ensure_nonzero (const float *actstart, float *r_actend)
 
NlaStripBKE_nlastrip_new (bAction *act, ID &animated_id)
 
NlaStripBKE_nlastack_add_strip (const OwnedAnimData owned_adt, bAction *act, const bool is_liboverride)
 
NlaStripBKE_nla_add_soundstrip (Main *bmain, Scene *scene, Speaker *speaker)
 
void BKE_nla_strip_foreach_id (NlaStrip *strip, LibraryForeachIDData *data)
 
void BKE_nlatrack_remove (ListBase *tracks, NlaTrack *nlt)
 
void BKE_nlatrack_remove_and_free (ListBase *tracks, NlaTrack *nlt, bool do_id_user)
 
static float nlastrip_get_frame_actionclip (NlaStrip *strip, float cframe, short mode)
 
static float nlastrip_get_frame_transition (NlaStrip *strip, float cframe, short mode)
 
float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
 
float BKE_nla_tweakedit_remap (AnimData *adt, float cframe, short mode)
 
bool BKE_nlastrips_has_space (ListBase *strips, float start, float end)
 
void BKE_nlastrips_sort_strips (ListBase *strips)
 
void BKE_nlastrips_add_strip_unsafe (ListBase *strips, NlaStrip *strip)
 
bool BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
 
void BKE_nlastrips_make_metas (ListBase *strips, bool is_temp)
 
void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
 
void BKE_nlastrips_clear_metas (ListBase *strips, bool only_sel, bool only_temp)
 
bool BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip)
 
void BKE_nlameta_flush_transforms (NlaStrip *mstrip)
 
NlaTrackBKE_nlatrack_find_active (ListBase *tracks)
 
NlaTrackBKE_nlatrack_find_tweaked (AnimData *adt)
 
void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt)
 
void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
 
bool BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
 
bool BKE_nlatrack_has_strips (ListBase *tracks)
 
void BKE_nlatrack_sort_strips (NlaTrack *nlt)
 
bool BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip, const bool is_liboverride)
 
void BKE_nlatrack_remove_strip (NlaTrack *track, NlaStrip *strip)
 
bool BKE_nlatrack_get_bounds (NlaTrack *nlt, float bounds[2])
 
bool BKE_nlatrack_is_nonlocal_in_liboverride (const ID *id, const NlaTrack *nlt)
 
static NlaStripnlastrip_find_active (ListBase *strips)
 
float BKE_nlastrip_compute_frame_from_previous_strip (NlaStrip *strip)
 
float BKE_nlastrip_compute_frame_to_next_strip (NlaStrip *strip)
 
NlaStripBKE_nlastrip_next_in_track (NlaStrip *strip, bool skip_transitions)
 
NlaStripBKE_nlastrip_prev_in_track (NlaStrip *strip, bool skip_transitions)
 
NlaStripBKE_nlastrip_find_active (NlaTrack *nlt)
 
void BKE_nlastrip_remove (ListBase *strips, NlaStrip *strip)
 
void BKE_nlastrip_remove_and_free (ListBase *strips, NlaStrip *strip, const bool do_id_user)
 
void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
 
static NlaStripnlastrip_find_by_name (ListBase *strips, const char *name)
 
NlaStripBKE_nlastrip_find_by_name (NlaTrack *nlt, const char *name)
 
bool BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
 
float BKE_nlastrip_distance_to_frame (const NlaStrip *strip, const float timeline_frame)
 
static void nlastrip_fix_resize_overlaps (NlaStrip *strip)
 
void BKE_nlastrip_recalculate_bounds_sync_action (NlaStrip *strip)
 
void BKE_nlastrip_recalculate_bounds (NlaStrip *strip)
 
void BKE_nlastrip_recalculate_blend (NlaStrip *strip)
 
bool BKE_nlatrack_has_animated_strips (NlaTrack *nlt)
 
bool BKE_nlatracks_have_animated_strips (ListBase *tracks)
 
void BKE_nlastrip_validate_fcurves (NlaStrip *strip)
 
bool BKE_nlastrip_has_curves_for_property (const PointerRNA *ptr, const PropertyRNA *prop)
 
static bool nla_editbone_name_check (void *arg, const char *name)
 
void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
 
static void nlastrip_get_endpoint_overlaps (NlaStrip *strip, NlaTrack *track, float **start, float **end)
 
static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
 
static bool nlastrip_validate_transition_start_end (ListBase *strips, NlaStrip *strip)
 
void BKE_nla_validate_state (AnimData *adt)
 
bool BKE_nla_action_is_stashed (AnimData *adt, bAction *act)
 
bool BKE_nla_action_stash (const OwnedAnimData owned_adt, const bool is_liboverride)
 
void BKE_nla_action_pushdown (const OwnedAnimData owned_adt, const bool is_liboverride)
 
bool BKE_nla_tweakmode_enter (const OwnedAnimData owned_adt)
 
static bool is_nla_in_tweakmode (AnimData *adt)
 
static void nla_tweakmode_exit_sync_strip_lengths (AnimData *adt)
 
static void nla_tweakmode_exit_nofollowptr (AnimData *adt)
 
void BKE_nla_tweakmode_exit_nofollowptr (AnimData *adt)
 
void BKE_nla_tweakmode_exit (const OwnedAnimData owned_adt)
 
void BKE_nla_tweakmode_clear_flags (AnimData *adt)
 
void BKE_nla_debug_print_flags (AnimData *adt, ID *owner_id)
 
static void blend_write_nla_strips (BlendWriter *writer, ListBase *strips)
 
static void blend_data_read_nla_strips (BlendDataReader *reader, ListBase *strips)
 
void BKE_nla_blend_write (BlendWriter *writer, ListBase *tracks)
 
void BKE_nla_blend_read_data (BlendDataReader *reader, ID *id_owner, ListBase *tracks)
 
void BKE_nla_liboverride_post_process (ID *id, AnimData *adt)
 
static bool visit_strip (NlaStrip *strip, blender::FunctionRef< bool(NlaStrip *)> callback)
 
bool blender::bke::nla::foreach_strip (ID *id, blender::FunctionRef< bool(NlaStrip *)> callback)
 
bool blender::bke::nla::foreach_strip_adt (const AnimData &adt, blender::FunctionRef< bool(NlaStrip *)> callback)
 

Variables

static CLG_LogRef LOG = {"bke.nla"}
 

Macro Definition Documentation

◆ STASH_TRACK_NAME

#define STASH_TRACK_NAME   DATA_("[Action Stash]")

Definition at line 2067 of file blenkernel/intern/nla.cc.

Referenced by BKE_nla_action_is_stashed(), and BKE_nla_action_stash().

Function Documentation

◆ BKE_nla_action_is_stashed()

bool BKE_nla_action_is_stashed ( AnimData * adt,
bAction * act )

Check if an action is "stashed" in the NLA already

The criteria for this are: 1) The action in question lives in a "stash" track. 2) We only check first-level strips. That is, we will not check inside meta strips.

Definition at line 2069 of file blenkernel/intern/nla.cc.

References LISTBASE_FOREACH, AnimData::nla_tracks, STASH_TRACK_NAME, and NlaStrip::strips.

Referenced by BKE_nla_action_stash().

◆ BKE_nla_action_pushdown()

void BKE_nla_action_pushdown ( OwnedAnimData owned_adt,
bool is_liboverride )

For the given AnimData block, add the active action to the NLA stack (i.e. 'push-down' action). The UI should only allow this for normal editing only (i.e. not in edit-mode for some strip's action), so no checks for this are performed.

TODO: maybe we should have checks for this too.

Definition at line 2158 of file blenkernel/intern/nla.cc.

References AnimData::act_blendmode, AnimData::act_extendmode, AnimData::act_influence, AnimData::action, OwnedAnimData::adt, blender::animrig::nla::assign_action_slot_handle(), BKE_nlastack_add_strip(), BKE_nlastrip_set_active(), BKE_nlastrip_validate_fcurves(), NlaStrip::blendmode, BLI_assert_msg, CLOG_ERROR, ELEM, NlaStrip::extendmode, NlaStrip::flag, blender::animrig::Action::has_keyframes(), NlaStrip::influence, LOG, NLASTRIP_FLAG_USR_INFLUENCE, OwnedAnimData::owner_id, AnimData::slot_handle, blender::animrig::unassign_action(), and UNUSED_VARS_NDEBUG.

Referenced by action_pushdown_exec(), and nlatracks_pushdown_exec().

◆ BKE_nla_action_stash()

◆ BKE_nla_add_soundstrip()

◆ BKE_nla_blend_read_data()

void BKE_nla_blend_read_data ( BlendDataReader * reader,
ID * id_owner,
ListBase * tracks )

◆ BKE_nla_blend_write()

void BKE_nla_blend_write ( BlendWriter * writer,
ListBase * tracks )

◆ BKE_nla_clip_length_ensure_nonzero()

void BKE_nla_clip_length_ensure_nonzero ( const float * actstart,
float * r_actend )

Ensure the passed range has non-zero length, using the same logic as BKE_nla_clip_length_get_nonzero to determine the new non-zero length.

See the documentation for BKE_nla_clip_length_get_nonzero for the reason this function exists and the issues around its use.

Usage: both actstart and r_actend should already be set to the start/end values of a strip's clip. r_actend will be modified if necessary to ensure the range is non-zero in length.

Definition at line 462 of file blenkernel/intern/nla.cc.

Referenced by animsys_create_action_track_strip(), BKE_nlastrip_new(), BKE_nlastrip_recalculate_bounds_sync_action(), draw_nla_main_data(), and blender::bke::tests::TEST().

◆ BKE_nla_clip_length_get_nonzero()

float BKE_nla_clip_length_get_nonzero ( const NlaStrip * strip)

Compute the length of the passed strip's clip, unless the clip length is zero in which case a non-zero value is returned.

WARNING: this function is very narrow and special-cased in its application. It was introduced as part of the fix for issue #107030, as a way to collect a bunch of whack-a-mole inline applications of this logic in one place. The logic itself isn't principled in any way, and should almost certainly not be used anywhere that it isn't already, short of one of those whack-a-mole inline places being overlooked.

The underlying purpose of this function is to ensure that the computed clip length for an NLA strip is (in certain places) never zero, in order to avoid the strip's scale having to be infinity. In other words, it's a hack. But at least now it's a hack collected in one place.

Definition at line 454 of file blenkernel/intern/nla.cc.

References NlaStrip::actend, and NlaStrip::actstart.

Referenced by BKE_nlastrip_recalculate_bounds(), nlastrip_get_frame_actionclip(), and blender::bke::tests::TEST().

◆ BKE_nla_debug_print_flags()

◆ BKE_nla_liboverride_post_process()

void BKE_nla_liboverride_post_process ( ID * id,
AnimData * adt )

Ensure NLA Tweak Mode related flags & pointers are consistent.

This may mean that tweak mode is exited, if not all relevant pointers can be set correctly.

Definition at line 2638 of file blenkernel/intern/nla.cc.

References AnimData::act_track, AnimData::actstrip, ADT_NLA_EDIT_ON, BKE_nla_tweakmode_exit(), BLI_assert, BLI_listbase_is_empty(), AnimData::flag, AnimData::nla_tracks, nla_tweakmode_find_active(), and UNUSED_VARS_NDEBUG.

Referenced by BKE_animdata_liboverride_post_process().

◆ BKE_nla_strip_foreach_id()

void BKE_nla_strip_foreach_id ( NlaStrip * strip,
LibraryForeachIDData * data )

◆ BKE_nla_tracks_copy()

void BKE_nla_tracks_copy ( Main * bmain,
ListBase * dst,
const ListBase * src,
int flag )

Copy all NLA data.

Parameters
flagControl ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh

Definition at line 218 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_copy(), BLI_addtail(), BLI_listbase_clear(), ELEM, flag, and LISTBASE_FOREACH.

Referenced by BKE_animdata_merge_copy(), and BKE_nla_tracks_copy_from_adt().

◆ BKE_nla_tracks_copy_from_adt()

void BKE_nla_tracks_copy_from_adt ( Main * bmain,
AnimData * adt_dest,
const AnimData * adt_source,
int flag )

Copy NLA tracks from #adt_source to #adt_dest, and update the active track/strip pointers to point at those copies.

Definition at line 331 of file blenkernel/intern/nla.cc.

References AnimData::act_track, AnimData::actstrip, BKE_nla_tracks_copy(), flag, AnimData::nla_tracks, and update_active_track().

Referenced by BKE_animdata_copy_in_lib().

◆ BKE_nla_tracks_free()

void BKE_nla_tracks_free ( ListBase * tracks,
bool do_id_user )

Free the elements of type NLA Tracks provided in the given list, but do not free the list itself since that is not free-standing

Definition at line 119 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_remove_and_free(), BLI_listbase_clear(), ELEM, and NlaTrack::next.

Referenced by BKE_animdata_free().

◆ BKE_nla_tweakedit_remap()

float BKE_nla_tweakedit_remap ( AnimData * adt,
float cframe,
short mode )

Non clipped mapping for strip-time <-> global time: mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_*

Public API method - perform this mapping using the given AnimData block and perform any necessary sanity checks on the value

Definition at line 735 of file blenkernel/intern/nla.cc.

References AnimData::act_track, AnimData::actstrip, ADT_NLA_EDIT_NOMAP, ADT_NLA_EDIT_ON, BKE_nlastrip_find_active(), BKE_nlatrack_find_active(), BKE_nlatrack_find_tweaked(), AnimData::flag, NlaStrip::flag, AnimData::nla_tracks, NLASTRIP_FLAG_USR_TIME, and nlastrip_get_frame().

Referenced by achannel_setting_slider_cb(), actkeys_find_key_in_list_element(), actkeys_mselect_column(), ANIM_draw_action_framerange(), applyTimeScaleValue(), applyTimeSlideValue(), bezt_nlamapping_apply(), bezt_nlamapping_restore(), bezt_to_transdata(), box_select_action(), calculate_fcurve_bounds_and_unhide(), channels_bake_exec(), columnselect_action_keys(), columnselect_graph_keys(), create_ghost_curves(), createTransActionData(), createTransGraphEditData(), delete_key_v3d_without_keying_set(), blender::animrig::delete_keyframe(), draw_fcurve_curve(), draw_fcurve_modifier_controls_envelope(), flushTransGraphData(), get_graph_keyframe_extents(), get_keyframe_extents(), get_normalized_fcurve_bounds(), graphkeys_click_insert_exec(), graphkeys_mselect_column(), initTimeSlide(), insert_graph_keys(), blender::animrig::nla_time_remap(), object_frame_has_keyframe(), pose_slide_apply(), pose_slide_init(), pose_slide_invoke_common(), rectf_curve_intersection(), region_select_action_keys(), summary_keyframes_loop(), TimeToTransData(), transform_snap_anim_flush_data_ex(), and ui_but_anim_flag().

◆ BKE_nla_tweakmode_clear_flags()

void BKE_nla_tweakmode_clear_flags ( AnimData * adt)

Clear all NLA Tweak Mode related flags on the ADT, tracks, and strips.

Definition at line 2470 of file blenkernel/intern/nla.cc.

References AnimData::flag, LISTBASE_FOREACH, AnimData::nla_tracks, and NlaStrip::strips.

Referenced by nla_tweakmode_exit_nofollowptr().

◆ BKE_nla_tweakmode_enter()

◆ BKE_nla_tweakmode_exit()

◆ BKE_nla_tweakmode_exit_nofollowptr()

void BKE_nla_tweakmode_exit_nofollowptr ( AnimData * adt)

Partially exit NLA tweak-mode for this AnimData block, without following any pointers to other data-blocks. This means no strip length syncing (as that needs to know info about the strip's Action), no reference counting on the Action, and no user update on the Action Slot.

This function just writes to the AnimData-owned data. It is intended to be used in blend-file reading code, which performs a reference count + rebuilds the slot user map later anyway.

Definition at line 2420 of file blenkernel/intern/nla.cc.

References is_nla_in_tweakmode(), and nla_tweakmode_exit_nofollowptr().

Referenced by BKE_animdata_blend_read_data().

◆ BKE_nla_validate_state()

void BKE_nla_validate_state ( AnimData * adt)

◆ BKE_nlameta_add_strip()

bool BKE_nlameta_add_strip ( NlaStrip * mstrip,
NlaStrip * strip )

Add the given NLA-Strip to the given Meta-Strip, assuming that the strip isn't attached to any list of strips

Definition at line 996 of file blenkernel/intern/nla.cc.

References BKE_nlastrips_add_strip(), BKE_nlastrips_has_space(), BLI_addhead(), BLI_addtail(), ELEM, NlaStrip::end, NlaStrip::next, NlaStrip::prev, NlaStrip::start, and NlaStrip::strips.

◆ BKE_nlameta_flush_transforms()

void BKE_nlameta_flush_transforms ( NlaStrip * mstrip)

Adjust the settings of NLA-Strips contained within a Meta-Strip (recursively), until the Meta-Strips children all fit within the Meta-Strip's new dimensions

Definition at line 1044 of file blenkernel/intern/nla.cc.

References BKE_nlameta_flush_transforms(), ELEM, NlaStrip::end, ListBase::first, IS_EQF, ListBase::last, LISTBASE_FOREACH, NLASTRIP_TYPE_META, ptr, RNA_float_set(), RNA_pointer_create(), NlaStrip::start, NlaStrip::strips, and NlaStrip::type.

Referenced by BKE_nlameta_flush_transforms(), nlaedit_snap_exec(), nlaedit_swap_exec(), nlastrip_shuffle_transformed(), and recalcData_nla().

◆ BKE_nlastack_add_strip()

NlaStrip * BKE_nlastack_add_strip ( OwnedAnimData owned_adt,
bAction * act,
bool is_liboverride )

◆ BKE_nlastrip_compute_frame_from_previous_strip()

float BKE_nlastrip_compute_frame_from_previous_strip ( NlaStrip * strip)

Compute the left-hand-side 'frame limit' of that strip, in its NLA track.

This is either :

  • the end frame of the previous strip, if the strip's track contains another strip on it left
  • the macro MINFRAMEF, if no strips are to the left of this strip in its track
Parameters
stripThe strip to compute the left-hand-side 'frame limit' of.
Returns
The beginning frame of the previous strip, or MINFRAMEF if no strips are next in that track.

Definition at line 1367 of file blenkernel/intern/nla.cc.

References NlaStrip::end, MINAFRAMEF, NLASTRIP_MIN_LEN_THRESH, NLASTRIP_TYPE_TRANSITION, NlaStrip::prev, NlaStrip::start, and NlaStrip::type.

◆ BKE_nlastrip_compute_frame_to_next_strip()

float BKE_nlastrip_compute_frame_to_next_strip ( NlaStrip * strip)

Compute the right-hand-side 'frame limit' of that strip, in its NLA track.

This is either :

  • the begin frame of the next strip, if the strip's track contains another strip on it right
  • the macro MAXFRAMEF, if no strips are to the right of this strip in its track
Parameters
stripThe strip to compute the right-hand-side 'frame limit' of.
Returns
The beginning frame of the next strip, or MAXFRAMEF if no strips are next in that track.

Definition at line 1384 of file blenkernel/intern/nla.cc.

References NlaStrip::end, MAXFRAMEF, NlaStrip::next, NLASTRIP_MIN_LEN_THRESH, NLASTRIP_TYPE_TRANSITION, NlaStrip::start, and NlaStrip::type.

◆ BKE_nlastrip_copy()

NlaStrip * BKE_nlastrip_copy ( Main * bmain,
NlaStrip * strip,
bool use_same_action,
int flag )

Copy NLA strip

Parameters
use_same_actionWhen true, the existing action is used (instead of being duplicated)
flagControl ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh

Definition at line 140 of file blenkernel/intern/nla.cc.

References NlaStrip::act, BKE_fcurves_copy(), BKE_id_copy_ex(), BKE_nlastrip_copy(), BLI_addtail(), BLI_listbase_clear(), copy_fmodifiers(), NlaStrip::fcurves, flag, bAction::id, id_us_plus(), LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, MEM_dupallocN, NlaStrip::modifiers, NlaStrip::next, NlaStrip::prev, and NlaStrip::strips.

Referenced by BKE_nlastrip_copy(), BKE_nlatrack_copy(), nlaedit_duplicate_exec(), and nlaedit_split_strip_actclip().

◆ BKE_nlastrip_distance_to_frame()

float BKE_nlastrip_distance_to_frame ( const NlaStrip * strip,
float timeline_frame )

Return the distance from the given frame to the NLA strip, measured in frames. If the given frame intersects the NLA strip, the distance is zero.

Definition at line 1524 of file blenkernel/intern/nla.cc.

References NlaStrip::end, and NlaStrip::start.

Referenced by nlaedit_strip_at_region_position().

◆ BKE_nlastrip_find_active()

NlaStrip * BKE_nlastrip_find_active ( NlaTrack * nlt)

Find the active NLA-strip within the given track.

Definition at line 1429 of file blenkernel/intern/nla.cc.

References nlastrip_find_active(), and NlaTrack::strips.

Referenced by BKE_nla_tweakedit_remap(), nla_panel_context(), and nla_tweakmode_find_active().

◆ BKE_nlastrip_find_by_name()

NlaStrip * BKE_nlastrip_find_by_name ( NlaTrack * nlt,
const char * name )

Find the NLA-strip with the given name within the given track.

Returns
pointer to the strip, or nullptr when not found.

Definition at line 1490 of file blenkernel/intern/nla.cc.

References nlastrip_find_by_name(), and NlaTrack::strips.

◆ BKE_nlastrip_free()

void BKE_nlastrip_free ( NlaStrip * strip,
bool do_id_user )

◆ BKE_nlastrip_has_curves_for_property()

bool BKE_nlastrip_has_curves_for_property ( const PointerRNA * ptr,
const PropertyRNA * prop )

Check if the given RNA pointer + property combo should be handled by NLA strip curves or not.

Definition at line 1808 of file blenkernel/intern/nla.cc.

References ELEM, ptr, RNA_struct_type_find_property(), and PointerRNA::type.

Referenced by BKE_fcurve_find_by_rna_context_ui(), and delete_key_button_exec().

◆ BKE_nlastrip_new()

◆ BKE_nlastrip_next_in_track()

NlaStrip * BKE_nlastrip_next_in_track ( NlaStrip * strip,
bool skip_transitions )

Returns the next strip in this strip's NLA track, or a null pointer.

Parameters
stripThe strip to find the next trip from.
check_transitionsWhether or not to skip transitions.
Returns
The next strip in the track, or NULL if none are present.

Definition at line 1401 of file blenkernel/intern/nla.cc.

References next, NlaStrip::next, and NLASTRIP_TYPE_TRANSITION.

Referenced by nlastrip_fix_overlapping().

◆ BKE_nlastrip_prev_in_track()

NlaStrip * BKE_nlastrip_prev_in_track ( NlaStrip * strip,
bool skip_transitions )

Returns the previous strip in this strip's NLA track, or a null pointer.

Parameters
stripThe strip to find the previous trip from.
check_transitionsWhether or not to skip transitions.
Returns
The previous strip in the track, or NULL if none are present.

Definition at line 1415 of file blenkernel/intern/nla.cc.

References NLASTRIP_TYPE_TRANSITION, and NlaStrip::prev.

Referenced by nlastrip_fix_overlapping().

◆ BKE_nlastrip_recalculate_blend()

void BKE_nlastrip_recalculate_blend ( NlaStrip * strip)

Recalculate the blend-in and blend-out values after a strip transform update.

Definition at line 1682 of file blenkernel/intern/nla.cc.

References NlaStrip::blendin, NlaStrip::blendout, CLAMP, CLAMP_MIN, NlaStrip::end, and NlaStrip::start.

Referenced by BKE_nla_validate_state(), and blender::bke::tests::TEST().

◆ BKE_nlastrip_recalculate_bounds()

void BKE_nlastrip_recalculate_bounds ( NlaStrip * strip)

Recalculate the start and end frames for the current strip, after changing the extents of the action or the mapping (repeats or scale factor) info.

Definition at line 1656 of file blenkernel/intern/nla.cc.

References BKE_nla_clip_length_get_nonzero(), NlaStrip::end, IS_EQF, nlastrip_fix_resize_overlaps(), NLASTRIP_TYPE_CLIP, NlaStrip::repeat, NlaStrip::scale, NlaStrip::start, and NlaStrip::type.

Referenced by BKE_nlastrip_recalculate_bounds_sync_action().

◆ BKE_nlastrip_recalculate_bounds_sync_action()

void BKE_nlastrip_recalculate_bounds_sync_action ( NlaStrip * strip)

Recalculate the start and end frames for the strip to match the bounds of its action such that the overall NLA animation result is unchanged.

Definition at line 1635 of file blenkernel/intern/nla.cc.

References NlaStrip::act, NlaStrip::actend, NlaStrip::action_slot_handle, NlaStrip::actstart, BKE_nla_clip_length_ensure_nonzero(), BKE_nlastrip_recalculate_bounds(), NLASTRIP_TYPE_CLIP, NlaStrip::scale, NlaStrip::start, and NlaStrip::type.

Referenced by animsys_create_tweak_strip(), nla_tweakmode_exit_sync_strip_lengths(), and nlaedit_sync_actlen_exec().

◆ BKE_nlastrip_remove()

void BKE_nlastrip_remove ( ListBase * strips,
NlaStrip * strip )

Definition at line 1438 of file blenkernel/intern/nla.cc.

References BLI_assert, and BLI_remlink().

Referenced by BKE_nlastrip_remove_and_free(), and BKE_nlatrack_remove_strip().

◆ BKE_nlastrip_remove_and_free()

void BKE_nlastrip_remove_and_free ( ListBase * strips,
NlaStrip * strip,
const bool do_id_user )

◆ BKE_nlastrip_set_active()

void BKE_nlastrip_set_active ( AnimData * adt,
NlaStrip * strip )

Make the given NLA-Strip the active one within the given block.

Definition at line 1450 of file blenkernel/intern/nla.cc.

References LISTBASE_FOREACH, AnimData::nla_tracks, NLASTRIP_FLAG_ACTIVE, and NlaStrip::strips.

Referenced by BKE_nla_action_pushdown().

◆ BKE_nlastrip_validate_autoblends()

◆ BKE_nlastrip_validate_fcurves()

◆ BKE_nlastrip_validate_name()

void BKE_nlastrip_validate_name ( AnimData * adt,
NlaStrip * strip )

◆ BKE_nlastrip_within_bounds()

bool BKE_nlastrip_within_bounds ( NlaStrip * strip,
float min,
float max )

Does the given NLA-strip fall within the given bounds (times)?.

Definition at line 1495 of file blenkernel/intern/nla.cc.

References NlaStrip::end, fabsf, IN_RANGE, IS_EQF, min, and NlaStrip::start.

Referenced by box_select_nla_strips(), get_visible_nla_strips(), nlaedit_select_leftright(), and nlaedit_strip_at_region_position().

◆ BKE_nlastrips_add_strip()

bool BKE_nlastrips_add_strip ( ListBase * strips,
NlaStrip * strip )

NULL checks incoming strip and verifies no overlap / invalid configuration against other strips in NLA Track before calling BKE_nlastrips_add_strip_unsafe.

Definition at line 880 of file blenkernel/intern/nla.cc.

References BKE_nlastrips_add_strip_unsafe(), BKE_nlastrips_has_space(), ELEM, NlaStrip::end, and NlaStrip::start.

Referenced by BKE_nlameta_add_strip(), BKE_nlatrack_add_strip(), blender::bke::tests::TEST(), and blender::bke::tests::TEST().

◆ BKE_nlastrips_add_strip_unsafe()

void BKE_nlastrips_add_strip_unsafe ( ListBase * strips,
NlaStrip * strip )

Add the given NLA-Strip to the given list of strips, assuming that it isn't currently a member of another list, NULL, or conflicting with existing strips position.

Definition at line 858 of file blenkernel/intern/nla.cc.

References BLI_addtail(), BLI_assert, BLI_insertlinkbefore(), ELEM, LISTBASE_FOREACH, and NlaStrip::start.

Referenced by BKE_nlastrips_add_strip(), nlastrip_shuffle_transformed(), and recalcData_nla().

◆ BKE_nlastrips_clear_metas()

void BKE_nlastrips_clear_metas ( ListBase * strips,
bool only_sel,
bool only_temp )

Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips.

Parameters
only_selonly consider selected meta-strips, otherwise all meta-strips are removed
only_temponly remove the 'temporary' meta-strips used for transforms

Definition at line 971 of file blenkernel/intern/nla.cc.

References BKE_nlastrips_clear_metastrip(), ELEM, ListBase::first, NlaStrip::flag, NlaStrip::next, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_META, and NlaStrip::type.

Referenced by createTransNlaData(), nlaedit_remove_meta_exec(), nlaedit_snap_exec(), nlaedit_swap_exec(), and special_aftertrans_update__nla().

◆ BKE_nlastrips_clear_metastrip()

void BKE_nlastrips_clear_metastrip ( ListBase * strips,
NlaStrip * strip )

Split a meta-strip into a set of normal strips.

Definition at line 949 of file blenkernel/intern/nla.cc.

References BKE_nlastrip_remove_and_free(), BLI_insertlinkbefore(), BLI_remlink(), ELEM, ListBase::first, NlaStrip::next, and NlaStrip::strips.

Referenced by BKE_nlastrips_clear_metas(), and nlaedit_split_strip_meta().

◆ BKE_nlastrips_has_space()

bool BKE_nlastrips_has_space ( ListBase * strips,
float start,
float end )

Check if there is any space in the given list to add the given strip.

Definition at line 783 of file blenkernel/intern/nla.cc.

References IS_EQF, and LISTBASE_FOREACH.

Referenced by BKE_nlameta_add_strip(), BKE_nlastrips_add_strip(), BKE_nlatrack_has_space(), and nlaedit_swap_exec().

◆ BKE_nlastrips_make_metas()

void BKE_nlastrips_make_metas ( ListBase * strips,
bool is_temp )

Convert 'islands' (i.e. continuous string of) selected strips to be contained within 'Meta-Strips' which act as strips which contain strips.

Parameters
is_tempare the meta-strips to be created 'temporary' ones used for transforms?

Definition at line 896 of file blenkernel/intern/nla.cc.

References BLI_addtail(), BLI_insertlinkbefore(), BLI_remlink(), ELEM, NlaStrip::end, ListBase::first, NlaStrip::flag, MEM_callocN, NlaStrip::next, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_META, NlaStrip::repeat, NlaStrip::scale, NlaStrip::start, NlaStrip::strips, and NlaStrip::type.

Referenced by createTransNlaData(), nlaedit_add_meta_exec(), nlaedit_snap_exec(), and nlaedit_swap_exec().

◆ BKE_nlastrips_sort_strips()

void BKE_nlastrips_sort_strips ( ListBase * strips)

Rearrange the strips in the track so that they are always in order (usually only needed after a strip has been moved)

Definition at line 815 of file blenkernel/intern/nla.cc.

References BLI_addhead(), BLI_insertlinkafter(), BLI_remlink(), ELEM, ListBase::first, ListBase::last, LISTBASE_FOREACH_BACKWARD, NlaStrip::next, and NlaStrip::start.

Referenced by BKE_nlatrack_sort_strips().

◆ BKE_nlatrack_add_strip()

◆ BKE_nlatrack_copy()

NlaTrack * BKE_nlatrack_copy ( Main * bmain,
NlaTrack * nlt,
bool use_same_actions,
int flag )

Copy a single NLA Track.

Parameters
flagControl ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh

Definition at line 189 of file blenkernel/intern/nla.cc.

References BKE_nlastrip_copy(), BLI_addtail(), BLI_listbase_clear(), flag, LISTBASE_FOREACH, MEM_dupallocN, NlaTrack::next, NlaTrack::prev, and NlaTrack::strips.

Referenced by BKE_nla_tracks_copy().

◆ BKE_nlatrack_find_active()

NlaTrack * BKE_nlatrack_find_active ( ListBase * tracks)

Find the active NLA-track for the given stack.

Definition at line 1138 of file blenkernel/intern/nla.cc.

References ELEM, LISTBASE_FOREACH, and NLATRACK_ACTIVE.

Referenced by BKE_nla_tweakedit_remap().

◆ BKE_nlatrack_find_tweaked()

NlaTrack * BKE_nlatrack_find_tweaked ( AnimData * adt)

Get the NLA Track that the active action/action strip comes from, since this info is not stored in AnimData. It also isn't as simple as just using the active track, since multiple tracks may have been entered at the same time.

Definition at line 1156 of file blenkernel/intern/nla.cc.

References AnimData::actstrip, BLI_findindex(), G, G_DEBUG, LISTBASE_FOREACH, NlaStrip::name, AnimData::nla_tracks, NLATRACK_ACTIVE, NLATRACK_DISABLED, and printf.

Referenced by action_layer_next_exec(), action_layer_prev_exec(), BKE_nla_tweakedit_remap(), and nlaedit_enable_tweakmode_exec().

◆ BKE_nlatrack_free()

void BKE_nlatrack_free ( NlaTrack * nlt,
bool do_id_user )

Remove & Frees all NLA strips from the given NLA track, then frees (doesn't remove) the track itself.

Definition at line 100 of file blenkernel/intern/nla.cc.

References BKE_nlastrip_remove_and_free(), ListBase::first, MEM_freeN(), NlaStrip::next, and NlaTrack::strips.

Referenced by BKE_nlatrack_remove_and_free().

◆ BKE_nlatrack_get_bounds()

bool BKE_nlatrack_get_bounds ( NlaTrack * nlt,
float bounds[2] )

Get the extents of the given NLA-Track including gaps between strips, returning whether this succeeded or not

Definition at line 1310 of file blenkernel/intern/nla.cc.

References ELEM, NlaStrip::end, ListBase::first, ListBase::last, NlaStrip::start, and NlaTrack::strips.

◆ BKE_nlatrack_has_animated_strips()

bool BKE_nlatrack_has_animated_strips ( NlaTrack * nlt)

Check if the given NLA-Track has any strips with their own F-Curves.

Definition at line 1708 of file blenkernel/intern/nla.cc.

References ELEM, ListBase::first, LISTBASE_FOREACH, and NlaTrack::strips.

Referenced by BKE_nlatracks_have_animated_strips().

◆ BKE_nlatrack_has_space()

bool BKE_nlatrack_has_space ( NlaTrack * nlt,
float start,
float end )

Check if there is any space in the given track to add a strip of the given length.

Definition at line 1235 of file blenkernel/intern/nla.cc.

References BKE_nlastrips_has_space(), NlaTrack::flag, IS_EQF, NLATRACK_PROTECTED, and NlaTrack::strips.

Referenced by nlaedit_move_down_exec(), and nlaedit_move_up_exec().

◆ BKE_nlatrack_has_strips()

bool BKE_nlatrack_has_strips ( ListBase * tracks)

Check to see if there are any NLA strips in the NLA tracks.

Definition at line 1255 of file blenkernel/intern/nla.cc.

References BLI_listbase_count(), BLI_listbase_is_empty(), and LISTBASE_FOREACH.

Referenced by version_nla_action_strip_hold().

◆ BKE_nlatrack_insert_after()

void BKE_nlatrack_insert_after ( ListBase * nla_tracks,
NlaTrack * prev,
NlaTrack * new_track,
bool is_liboverride )

Inserts a given NLA track after a specified NLA track within the passed NLA track list.

If nullptr, then caller intends to insert a new head. But, tracks are not allowed to be placed before library overrides. So it must inserted after the last override.

Definition at line 385 of file blenkernel/intern/nla.cc.

References BLI_assert, BLI_findindex(), BLI_insertlinkafter(), BLI_uniquename(), DATA_, ListBase::first, NlaTrack::flag, NlaTrack::index, NlaTrack::name, NlaTrack::next, NLATRACK_OVERRIDELIBRARY_LOCAL, offsetof, and NlaTrack::prev.

Referenced by BKE_nlatrack_insert_before(), BKE_nlatrack_new_after(), and recalcData_nla().

◆ BKE_nlatrack_insert_before()

void BKE_nlatrack_insert_before ( ListBase * nla_tracks,
NlaTrack * next,
NlaTrack * new_track,
bool is_liboverride )

Inserts a given NLA track before a specified NLA track within the passed NLA track list.

Definition at line 356 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_insert_after(), BLI_findindex(), BLI_insertlinkbefore(), BLI_uniquename(), DATA_, NlaTrack::index, NlaTrack::name, next, NLATRACK_OVERRIDELIBRARY_LOCAL, offsetof, and STRNCPY.

Referenced by BKE_nlatrack_new_before(), and recalcData_nla().

◆ BKE_nlatrack_is_nonlocal_in_liboverride()

bool BKE_nlatrack_is_nonlocal_in_liboverride ( const ID * id,
const NlaTrack * nlt )

◆ BKE_nlatrack_new()

NlaTrack * BKE_nlatrack_new ( void )

Create new NLA Track. The returned pointer is owned by the caller.

Definition at line 345 of file blenkernel/intern/nla.cc.

References NlaTrack::flag, MEM_callocN, NLATRACK_OVERRIDELIBRARY_LOCAL, and NLATRACK_SELECTED.

Referenced by BKE_nlatrack_new_after(), BKE_nlatrack_new_before(), and recalcData_nla().

◆ BKE_nlatrack_new_after()

NlaTrack * BKE_nlatrack_new_after ( ListBase * nla_tracks,
NlaTrack * prev,
bool is_liboverride )

Calls BKE_nlatrack_new to create a new NLA track, inserts it after the given NLA track with BKE_nlatrack_insert_after.

Definition at line 435 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_insert_after(), and BKE_nlatrack_new().

Referenced by BKE_nla_action_stash(), BKE_nlatrack_new_tail(), nlaedit_add_tracks_existing(), nlaedit_duplicate_exec(), and nlaedit_snap_exec().

◆ BKE_nlatrack_new_before()

NlaTrack * BKE_nlatrack_new_before ( ListBase * nla_tracks,
NlaTrack * next,
bool is_liboverride )

Calls BKE_nlatrack_new to create a new NLA track, inserts it before the given NLA track with BKE_nlatrack_insert_before.

Definition at line 426 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_insert_before(), BKE_nlatrack_new(), and next.

Referenced by BKE_nlatrack_new_head().

◆ BKE_nlatrack_new_head()

NlaTrack * BKE_nlatrack_new_head ( ListBase * nla_tracks,
bool is_liboverride )

Calls BKE_nlatrack_new to create a new NLA track, inserts it as the head of the NLA track list with BKE_nlatrack_new_before.

Definition at line 444 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_new_before(), and ListBase::first.

Referenced by blender::animrig::tests::KeyframingTest::SetUp(), and blender::bke::tests::TEST().

◆ BKE_nlatrack_new_tail()

◆ BKE_nlatrack_remove()

void BKE_nlatrack_remove ( ListBase * tracks,
NlaTrack * nlt )

Removes the given NLA track from the list of tracks provided.

Definition at line 610 of file blenkernel/intern/nla.cc.

References BLI_assert, and BLI_remlink().

Referenced by BKE_nlatrack_remove_and_free().

◆ BKE_nlatrack_remove_and_free()

void BKE_nlatrack_remove_and_free ( ListBase * tracks,
NlaTrack * nlt,
bool do_id_user )

Remove the given NLA track from the list of NLA tracks, free the track's data, and the track itself.

Definition at line 616 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_free(), and BKE_nlatrack_remove().

Referenced by BKE_nla_tracks_free(), ED_animedit_unlink_action(), nlaedit_delete_tracks_exec(), nlatrack_truncate_temporary_tracks(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), and blender::bke::tests::TEST().

◆ BKE_nlatrack_remove_strip()

void BKE_nlatrack_remove_strip ( NlaTrack * track,
NlaStrip * strip )

◆ BKE_nlatrack_set_active()

void BKE_nlatrack_set_active ( ListBase * tracks,
NlaTrack * nlt )

Make the given NLA-track the active one for the given stack. If no track is provided, this function can be used to simply deactivate all the NLA tracks in the given stack too.

Definition at line 1217 of file blenkernel/intern/nla.cc.

References ELEM, NlaTrack::flag, LISTBASE_FOREACH, and NLATRACK_ACTIVE.

Referenced by BKE_nla_action_stash(), BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), nlaedit_add_tracks_empty(), nlaedit_add_tracks_existing(), nlaedit_duplicate_exec(), nlaedit_snap_exec(), nlastrips_to_animdata(), blender::ed::object::object_speaker_add_exec(), and recalcData_nla().

◆ BKE_nlatrack_solo_toggle()

void BKE_nlatrack_solo_toggle ( AnimData * adt,
NlaTrack * nlt )

Toggle the 'solo' setting for the given NLA-track, making sure that it is the only one that has this status in its AnimData block.

Definition at line 1185 of file blenkernel/intern/nla.cc.

References ADT_NLA_SOLO_TRACK, ELEM, ListBase::first, AnimData::flag, NlaTrack::flag, LISTBASE_FOREACH, AnimData::nla_tracks, and NLATRACK_SOLO.

Referenced by achannel_nlatrack_solo_widget_cb(), nlaedit_disable_tweakmode(), and nlaedit_enable_tweakmode_exec().

◆ BKE_nlatrack_sort_strips()

void BKE_nlatrack_sort_strips ( NlaTrack * nlt)

Rearrange the strips in the track so that they are always in order (usually only needed after a strip has been moved).

Definition at line 1273 of file blenkernel/intern/nla.cc.

References BKE_nlastrips_sort_strips(), ELEM, ListBase::first, and NlaTrack::strips.

Referenced by special_aftertrans_update__nla().

◆ BKE_nlatracks_have_animated_strips()

bool BKE_nlatracks_have_animated_strips ( ListBase * tracks)

Check if given NLA-Tracks have any strips with their own F-Curves.

Definition at line 1726 of file blenkernel/intern/nla.cc.

References BKE_nlatrack_has_animated_strips(), ELEM, and LISTBASE_FOREACH.

◆ blend_data_read_nla_strips()

◆ blend_write_nla_strips()

static void blend_write_nla_strips ( BlendWriter * writer,
ListBase * strips )
static

◆ find_active_strip_from_listbase()

static NlaStrip * find_active_strip_from_listbase ( const NlaStrip * active_strip,
const ListBase * strips_source,
const ListBase * strips_dest )
static

Find active_strip in strips_source, then return the strip with the same index from strips_dest.

Definition at line 243 of file blenkernel/intern/nla.cc.

References BLI_assert_msg, BLI_listbase_count(), find_active_strip_from_listbase(), ListBase::first, LISTBASE_FOREACH, NlaStrip::next, NLASTRIP_TYPE_META, NlaStrip::strips, and NlaStrip::type.

Referenced by find_active_strip_from_listbase(), and update_active_strip().

◆ is_nla_in_tweakmode()

static bool is_nla_in_tweakmode ( AnimData * adt)
static

◆ nla_editbone_name_check()

static bool nla_editbone_name_check ( void * arg,
const char * name )
static

Definition at line 1842 of file blenkernel/intern/nla.cc.

References BLI_ghash_haskey().

Referenced by BKE_nlastrip_validate_name().

◆ nla_tweakmode_exit_nofollowptr()

static void nla_tweakmode_exit_nofollowptr ( AnimData * adt)
static

◆ nla_tweakmode_exit_sync_strip_lengths()

◆ nla_tweakmode_find_active()

static void nla_tweakmode_find_active ( const ListBase * nla_tracks,
NlaTrack ** r_track_of_active_strip,
NlaStrip ** r_active_strip )
static

Find the active track and strip.

The active strip may or may not be on the active track.

Definition at line 2217 of file blenkernel/intern/nla.cc.

References BKE_nlastrip_find_active(), LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLATRACK_ACTIVE, NLATRACK_SELECTED, and NlaTrack::strips.

Referenced by BKE_nla_liboverride_post_process(), and BKE_nla_tweakmode_enter().

◆ nlastrip_find_active()

static NlaStrip * nlastrip_find_active ( ListBase * strips)
static

◆ nlastrip_find_by_name()

static NlaStrip * nlastrip_find_by_name ( ListBase * strips,
const char * name )
static

◆ nlastrip_fix_resize_overlaps()

static void nlastrip_fix_resize_overlaps ( NlaStrip * strip)
static

◆ nlastrip_get_endpoint_overlaps()

static void nlastrip_get_endpoint_overlaps ( NlaStrip * strip,
NlaTrack * track,
float ** start,
float ** end )
static

◆ nlastrip_get_frame()

float nlastrip_get_frame ( NlaStrip * strip,
float cframe,
short mode )

Convert non clipped mapping for strip-time <-> global time: mode = eNlaTime_ConvertModes[] -> NLATIME_CONVERT_*

Only secure for 'internal' (i.e. within AnimSys evaluation) operations, but should not be directly relied on for stuff which interacts with editors.

Definition at line 721 of file blenkernel/intern/nla.cc.

References nlastrip_get_frame_actionclip(), nlastrip_get_frame_transition(), NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLASTRIP_TYPE_TRANSITION, and NlaStrip::type.

Referenced by bezt_apply_nlamapping(), BKE_nla_tweakedit_remap(), nla_actionclip_draw_markers(), nlaedit_apply_scale_exec(), nlaedit_split_strip_actclip(), and nlastrip_evaluate_controls().

◆ nlastrip_get_frame_actionclip()

◆ nlastrip_get_frame_transition()

static float nlastrip_get_frame_transition ( NlaStrip * strip,
float cframe,
short mode )
static

◆ nlastrip_validate_transition_start_end()

static bool nlastrip_validate_transition_start_end ( ListBase * strips,
NlaStrip * strip )
static

Ensure every transition's start/end properly set. Strip will be removed / freed if it doesn't fit (invalid). Return value indicates if passed strip is valid/fixed or invalid/removed.

Definition at line 2019 of file blenkernel/intern/nla.cc.

References BKE_nlastrip_remove_and_free(), NlaStrip::end, NlaStrip::next, NLASTRIP_TYPE_TRANSITION, NlaStrip::prev, NlaStrip::start, and NlaStrip::type.

Referenced by BKE_nla_validate_state().

◆ update_active_strip()

static void update_active_strip ( AnimData * adt_dest,
NlaTrack * track_dest,
const AnimData * adt_source,
const NlaTrack * track_source )
static

◆ update_active_track()

◆ visit_strip()

static bool visit_strip ( NlaStrip * strip,
blender::FunctionRef< bool(NlaStrip *)> callback )
static

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"bke.nla"}
static

Definition at line 52 of file blenkernel/intern/nla.cc.

Referenced by BKE_nla_action_pushdown(), and BKE_nla_action_stash().