Blender  V3.3
Macros | Enumerations | Functions
BKE_nla.h File Reference

Go to the source code of this file.

Macros

#define NLASTRIP_MIN_LEN_THRESH   0.1f
 

Enumerations

enum  eNlaTime_ConvertModes { NLATIME_CONVERT_EVAL = 0 , NLATIME_CONVERT_UNMAP , NLATIME_CONVERT_MAP }
 

Functions

void BKE_nlastrip_free (ListBase *strips, struct NlaStrip *strip, bool do_id_user)
 
void BKE_nlatrack_free (ListBase *tracks, struct NlaTrack *nlt, bool do_id_user)
 
void BKE_nla_tracks_free (ListBase *tracks, bool do_id_user)
 
struct NlaStrip * BKE_nlastrip_copy (struct Main *bmain, struct NlaStrip *strip, bool use_same_action, int flag)
 
struct NlaTrack * BKE_nlatrack_copy (struct Main *bmain, struct NlaTrack *nlt, bool use_same_actions, int flag)
 
void BKE_nla_tracks_copy (struct Main *bmain, ListBase *dst, const ListBase *src, int flag)
 
void BKE_nla_tracks_copy_from_adt (struct Main *bmain, struct AnimData *adt_dest, const struct AnimData *adt_source, int flag)
 
struct NlaTrack * BKE_nlatrack_add (struct AnimData *adt, struct NlaTrack *prev, bool is_liboverride)
 
struct NlaStrip * BKE_nlastrip_new (struct bAction *act)
 
struct NlaStrip * BKE_nlastack_add_strip (struct AnimData *adt, struct bAction *act, bool is_liboverride)
 
struct NlaStrip * BKE_nla_add_soundstrip (struct Main *bmain, struct Scene *scene, struct Speaker *speaker)
 
void BKE_nla_strip_foreach_id (struct NlaStrip *strip, struct LibraryForeachIDData *data)
 
bool BKE_nlastrips_has_space (ListBase *strips, float start, float end)
 
void BKE_nlastrips_sort_strips (ListBase *strips)
 
bool BKE_nlastrips_add_strip (ListBase *strips, struct NlaStrip *strip)
 
void BKE_nlastrips_make_metas (ListBase *strips, bool is_temp)
 
void BKE_nlastrips_clear_metas (ListBase *strips, bool only_sel, bool only_temp)
 
void BKE_nlastrips_clear_metastrip (ListBase *strips, struct NlaStrip *strip)
 
bool BKE_nlameta_add_strip (struct NlaStrip *mstrip, struct NlaStrip *strip)
 
void BKE_nlameta_flush_transforms (struct NlaStrip *mstrip)
 
struct NlaTrack * BKE_nlatrack_find_active (ListBase *tracks)
 
void BKE_nlatrack_set_active (ListBase *tracks, struct NlaTrack *nlt)
 
struct NlaTrack * BKE_nlatrack_find_tweaked (struct AnimData *adt)
 
void BKE_nlatrack_solo_toggle (struct AnimData *adt, struct NlaTrack *nlt)
 
bool BKE_nlatrack_has_space (struct NlaTrack *nlt, float start, float end)
 
void BKE_nlatrack_sort_strips (struct NlaTrack *nlt)
 
bool BKE_nlatrack_add_strip (struct NlaTrack *nlt, struct NlaStrip *strip, bool is_liboverride)
 
bool BKE_nlatrack_get_bounds (struct NlaTrack *nlt, float bounds[2])
 
bool BKE_nlatrack_is_nonlocal_in_liboverride (const struct ID *id, const struct NlaTrack *nlt)
 
float BKE_nlastrip_compute_frame_from_previous_strip (struct NlaStrip *strip)
 
float BKE_nlastrip_compute_frame_to_next_strip (struct NlaStrip *strip)
 
struct NlaStrip * BKE_nlastrip_find_active (struct NlaTrack *nlt)
 
void BKE_nlastrip_set_active (struct AnimData *adt, struct NlaStrip *strip)
 
bool BKE_nlastrip_within_bounds (struct NlaStrip *strip, float min, float max)
 
void BKE_nlastrip_recalculate_bounds (struct NlaStrip *strip)
 
void BKE_nlastrip_recalculate_bounds_sync_action (struct NlaStrip *strip)
 
void BKE_nlastrip_validate_name (struct AnimData *adt, struct NlaStrip *strip)
 
bool BKE_nlatrack_has_animated_strips (struct NlaTrack *nlt)
 
bool BKE_nlatracks_have_animated_strips (ListBase *tracks)
 
void BKE_nlastrip_validate_fcurves (struct NlaStrip *strip)
 
bool BKE_nlastrip_has_curves_for_property (const struct PointerRNA *ptr, const struct PropertyRNA *prop)
 
void BKE_nla_validate_state (struct AnimData *adt)
 
bool BKE_nla_action_is_stashed (struct AnimData *adt, struct bAction *act)
 
bool BKE_nla_action_stash (struct AnimData *adt, bool is_liboverride)
 
void BKE_nla_action_pushdown (struct AnimData *adt, bool is_liboverride)
 
bool BKE_nla_tweakmode_enter (struct AnimData *adt)
 
void BKE_nla_tweakmode_exit (struct AnimData *adt)
 
float BKE_nla_tweakedit_remap (struct AnimData *adt, float cframe, short mode)
 
void BKE_nla_blend_write (struct BlendWriter *writer, struct ListBase *tracks)
 
void BKE_nla_blend_read_data (struct BlendDataReader *reader, struct ListBase *tracks)
 
void BKE_nla_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct ListBase *tracks)
 
void BKE_nla_blend_read_expand (struct BlendExpander *expander, struct ListBase *tracks)
 

Macro Definition Documentation

◆ NLASTRIP_MIN_LEN_THRESH

#define NLASTRIP_MIN_LEN_THRESH   0.1f

Definition at line 11 of file BKE_nla.h.

Enumeration Type Documentation

◆ eNlaTime_ConvertModes

Enumerator
NLATIME_CONVERT_EVAL 
NLATIME_CONVERT_UNMAP 
NLATIME_CONVERT_MAP 

Definition at line 352 of file BKE_nla.h.

Function Documentation

◆ BKE_nla_action_is_stashed()

bool BKE_nla_action_is_stashed ( struct AnimData *  adt,
struct 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 1823 of file nla.c.

References NlaStrip::act, ListBase::first, NlaTrack::name, NlaStrip::next, NlaTrack::next, AnimData::nla_tracks, STASH_TRACK_NAME, and NlaTrack::strips.

Referenced by BKE_nla_action_stash().

◆ BKE_nla_action_pushdown()

void BKE_nla_action_pushdown ( struct AnimData *  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 1909 of file nla.c.

References AnimData::act_blendmode, AnimData::act_extendmode, AnimData::act_influence, AnimData::action, action_has_motion(), BKE_nlastack_add_strip(), BKE_nlastrip_set_active(), BKE_nlastrip_validate_fcurves(), NlaStrip::blendmode, CLOG_ERROR, ELEM, NlaStrip::extendmode, NlaStrip::flag, bAction::id, id_us_min(), NlaStrip::influence, LOG, NLASTRIP_FLAG_USR_INFLUENCE, and NULL.

Referenced by action_pushdown_exec(), and nlachannels_pushdown_exec().

◆ BKE_nla_action_stash()

bool BKE_nla_action_stash ( struct AnimData *  adt,
bool  is_liboverride 
)

◆ BKE_nla_add_soundstrip()

struct NlaStrip* BKE_nla_add_soundstrip ( struct Main *  bmain,
struct Scene *  scene,
struct Speaker *  speaker 
)

◆ BKE_nla_blend_read_data()

void BKE_nla_blend_read_data ( struct BlendDataReader *  reader,
struct ListBase *  tracks 
)

Definition at line 2228 of file nla.c.

References blend_data_read_nla_strips(), BLO_read_list(), LISTBASE_FOREACH, and tracks.

Referenced by BKE_animdata_blend_read_data().

◆ BKE_nla_blend_read_expand()

void BKE_nla_blend_read_expand ( struct BlendExpander *  expander,
struct ListBase *  tracks 
)

Definition at line 2252 of file nla.c.

References blend_read_expand_nla_strips(), LISTBASE_FOREACH, and tracks.

Referenced by BKE_animdata_blend_read_expand().

◆ BKE_nla_blend_read_lib()

void BKE_nla_blend_read_lib ( struct BlendLibReader *  reader,
struct ID *  id,
struct ListBase *  tracks 
)

◆ BKE_nla_blend_write()

void BKE_nla_blend_write ( struct BlendWriter *  writer,
struct ListBase *  tracks 
)

Definition at line 2216 of file nla.c.

References blend_write_nla_strips(), BLO_write_struct, LISTBASE_FOREACH, and tracks.

Referenced by BKE_animdata_blend_write().

◆ BKE_nla_strip_foreach_id()

void BKE_nla_strip_foreach_id ( struct NlaStrip *  strip,
struct LibraryForeachIDData *  data 
)

Callback used by lib_query to walk over all ID usages (mimics foreach_id callback of IDTypeInfo structure).

Definition at line 513 of file nla.c.

References NlaStrip::act, BKE_fcurve_foreach_id(), BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_nla_strip_foreach_id(), data, NlaStrip::fcurves, IDWALK_CB_USER, LISTBASE_FOREACH, and NlaStrip::strips.

Referenced by BKE_animdata_foreach_id(), and BKE_nla_strip_foreach_id().

◆ BKE_nla_tracks_copy()

void BKE_nla_tracks_copy ( struct 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.h

Definition at line 226 of file nla.c.

References BKE_nlatrack_copy(), BLI_addtail(), BLI_listbase_clear(), ELEM, NlaTrack::next, NULL, and src.

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 ( struct Main *  bmain,
struct AnimData *  adt_dest,
const struct 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.

Referenced by BKE_animdata_copy().

◆ 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 127 of file nla.c.

References BKE_nlatrack_free(), BLI_listbase_clear(), ELEM, ListBase::first, NlaTrack::next, NULL, and tracks.

Referenced by BKE_animdata_free().

◆ BKE_nla_tweakedit_remap()

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

◆ BKE_nla_tweakmode_enter()

bool BKE_nla_tweakmode_enter ( struct AnimData *  adt)

◆ BKE_nla_tweakmode_exit()

void BKE_nla_tweakmode_exit ( struct AnimData *  adt)

◆ BKE_nla_validate_state()

void BKE_nla_validate_state ( struct AnimData *  adt)

Ensure that auto-blending and other settings are set correctly.

Definition at line 1798 of file nla.c.

References BKE_nlastrip_validate_autoblends(), ELEM, ListBase::first, NlaStrip::next, NlaTrack::next, AnimData::nla_tracks, NULL, and NlaTrack::strips.

Referenced by ED_nla_postop_refresh().

◆ BKE_nlameta_add_strip()

bool BKE_nlameta_add_strip ( struct NlaStrip *  mstrip,
struct 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 902 of file nla.c.

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

◆ BKE_nlameta_flush_transforms()

void BKE_nlameta_flush_transforms ( struct 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 950 of file nla.c.

References BKE_nlameta_flush_transforms(), ELEM, NlaStrip::end, ListBase::first, IS_EQF, ListBase::last, NlaStrip::next, NLASTRIP_TYPE_META, NULL, offset, 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(), and recalcData_nla().

◆ BKE_nlastack_add_strip()

struct NlaStrip* BKE_nlastack_add_strip ( struct AnimData *  adt,
struct bAction *  act,
bool  is_liboverride 
)

Add new NLA-strip to the top of the NLA stack - i.e. into the last track if space, or a new one otherwise.

Definition at line 445 of file nla.c.

References BKE_nlastrip_new(), BKE_nlastrip_validate_name(), BKE_nlatrack_add(), BKE_nlatrack_add_strip(), ELEM, ListBase::last, AnimData::nla_tracks, and NULL.

Referenced by animrecord_check_state(), and BKE_nla_action_pushdown().

◆ BKE_nlastrip_compute_frame_from_previous_strip()

float BKE_nlastrip_compute_frame_from_previous_strip ( struct 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 1242 of file nla.c.

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 ( struct 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 1259 of file nla.c.

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

◆ BKE_nlastrip_copy()

struct NlaStrip* BKE_nlastrip_copy ( struct Main *  bmain,
struct 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.h

Definition at line 148 of file nla.c.

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

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

◆ BKE_nlastrip_find_active()

struct NlaStrip* BKE_nlastrip_find_active ( struct NlaTrack *  nlt)

Find the active NLA-strip within the given track.

Definition at line 1276 of file nla.c.

References nlastrip_find_active(), NULL, and NlaTrack::strips.

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

◆ BKE_nlastrip_free()

void BKE_nlastrip_free ( ListBase *  strips,
struct NlaStrip *  strip,
bool  do_id_user 
)

◆ BKE_nlastrip_has_curves_for_property()

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

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

Referenced by BKE_fcurve_find_by_rna_context_ui(), and delete_key_button_exec().

◆ BKE_nlastrip_new()

struct NlaStrip* BKE_nlastrip_new ( struct bAction *  act)

◆ BKE_nlastrip_recalculate_bounds()

void BKE_nlastrip_recalculate_bounds ( struct 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 1452 of file nla.c.

References NlaStrip::actend, NlaStrip::actstart, NlaStrip::end, IS_EQF, nlastrip_fix_resize_overlaps(), NLASTRIP_TYPE_CLIP, NULL, 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 ( struct 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 1435 of file nla.c.

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

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

◆ BKE_nlastrip_set_active()

void BKE_nlastrip_set_active ( struct AnimData *  adt,
struct NlaStrip *  strip 
)

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

Definition at line 1285 of file nla.c.

References ListBase::first, NlaStrip::flag, NlaStrip::next, NlaTrack::next, AnimData::nla_tracks, NLASTRIP_FLAG_ACTIVE, NULL, and NlaTrack::strips.

Referenced by BKE_nla_action_pushdown().

◆ BKE_nlastrip_validate_fcurves()

void BKE_nlastrip_validate_fcurves ( struct NlaStrip *  strip)

◆ BKE_nlastrip_validate_name()

void BKE_nlastrip_validate_name ( struct AnimData *  adt,
struct NlaStrip *  strip 
)

◆ BKE_nlastrip_within_bounds()

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

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

Definition at line 1308 of file nla.c.

References NlaStrip::end, fabsf, IN_RANGE, IS_EQF, max, min, NULL, 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,
struct NlaStrip *  strip 
)

Add the given NLA-Strip to the given list of strips, assuming that it isn't currently a member of another list

Definition at line 767 of file nla.c.

References BKE_nlastrips_has_space(), BLI_addtail(), BLI_insertlinkbefore(), ELEM, NlaStrip::end, ListBase::first, NlaStrip::next, NULL, and NlaStrip::start.

Referenced by BKE_nlameta_add_strip(), and BKE_nlatrack_add_strip().

◆ 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 877 of file nla.c.

References BKE_nlastrips_clear_metastrip(), ELEM, ListBase::first, NlaStrip::flag, NlaStrip::next, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_META, NULL, 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,
struct NlaStrip *  strip 
)

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

Definition at line 855 of file nla.c.

References BKE_nlastrip_free(), BLI_insertlinkbefore(), BLI_remlink(), ELEM, ListBase::first, NlaStrip::next, NULL, 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 690 of file nla.c.

References NlaStrip::end, ListBase::first, IS_EQF, NlaStrip::next, NULL, NlaStrip::start, and SWAP.

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 802 of file nla.c.

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, NULL, 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 724 of file nla.c.

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

Referenced by BKE_nlatrack_sort_strips().

◆ BKE_nlatrack_add()

struct NlaTrack* BKE_nlatrack_add ( struct AnimData *  adt,
struct NlaTrack *  prev,
bool  is_liboverride 
)

◆ BKE_nlatrack_add_strip()

bool BKE_nlatrack_add_strip ( struct NlaTrack *  nlt,
struct NlaStrip *  strip,
bool  is_liboverride 
)

◆ BKE_nlatrack_copy()

struct NlaTrack* BKE_nlatrack_copy ( struct Main *  bmain,
struct 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.h

Definition at line 197 of file nla.c.

References BKE_nlastrip_copy(), BLI_addtail(), BLI_listbase_clear(), ListBase::first, MEM_dupallocN, NlaStrip::next, NlaTrack::next, NULL, NlaTrack::prev, and NlaTrack::strips.

Referenced by BKE_nla_tracks_copy().

◆ BKE_nlatrack_find_active()

struct NlaTrack* BKE_nlatrack_find_active ( ListBase *  tracks)

Find the active NLA-track for the given stack.

Definition at line 1032 of file nla.c.

References ELEM, ListBase::first, NlaTrack::flag, NlaTrack::next, NLATRACK_ACTIVE, NULL, and tracks.

Referenced by BKE_nla_tweakedit_remap().

◆ BKE_nlatrack_find_tweaked()

struct NlaTrack* BKE_nlatrack_find_tweaked ( struct 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 1052 of file nla.c.

References AnimData::actstrip, BLI_findindex(), ListBase::first, NlaTrack::flag, G, G_DEBUG, NlaStrip::name, NlaTrack::name, NlaTrack::next, AnimData::nla_tracks, NLATRACK_ACTIVE, NLATRACK_DISABLED, NULL, and NlaTrack::strips.

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 ( ListBase *  tracks,
struct NlaTrack *  nlt,
bool  do_id_user 
)

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

Definition at line 103 of file nla.c.

References BKE_nlastrip_free(), BLI_freelinkN(), ListBase::first, MEM_freeN, NlaStrip::next, NULL, NlaTrack::strips, and tracks.

Referenced by BKE_nla_tracks_free(), ED_animedit_unlink_action(), and nlaedit_delete_tracks_exec().

◆ BKE_nlatrack_get_bounds()

bool BKE_nlatrack_get_bounds ( struct 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 1185 of file nla.c.

References bounds(), ELEM, NlaStrip::end, ListBase::first, ListBase::last, NULL, NlaStrip::start, and NlaTrack::strips.

◆ BKE_nlatrack_has_animated_strips()

bool BKE_nlatrack_has_animated_strips ( struct NlaTrack *  nlt)

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

Definition at line 1483 of file nla.c.

References ELEM, NlaStrip::fcurves, ListBase::first, NlaStrip::next, NULL, and NlaTrack::strips.

Referenced by BKE_nlatracks_have_animated_strips().

◆ BKE_nlatrack_has_space()

bool BKE_nlatrack_has_space ( struct 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 1137 of file nla.c.

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

Referenced by nlaedit_move_down_exec(), nlaedit_move_up_exec(), and recalcData_nla().

◆ BKE_nlatrack_is_nonlocal_in_liboverride()

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

Check whether given NLA track is not local (i.e. from linked data) when the object is a library override.

Parameters
nltMay be NULL, in which case we consider it as a non-local track case.

Referenced by nla_fmodifier_add_exec(), nla_fmodifier_paste_exec(), nlaedit_add_meta_exec(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_remove_meta_exec(), nlaedit_split_exec(), nlaedit_swap_exec(), rearrange_animchannels_filter_visible(), rearrange_nla_channels(), and recalcData_nla().

◆ BKE_nlatrack_set_active()

void BKE_nlatrack_set_active ( ListBase *  tracks,
struct 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 1117 of file nla.c.

References ELEM, ListBase::first, NlaTrack::flag, NlaTrack::next, NLATRACK_ACTIVE, NULL, and tracks.

Referenced by BKE_nlatrack_add().

◆ BKE_nlatrack_solo_toggle()

void BKE_nlatrack_solo_toggle ( struct AnimData *  adt,
struct 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 1083 of file nla.c.

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

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

◆ BKE_nlatrack_sort_strips()

void BKE_nlatrack_sort_strips ( struct 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 1157 of file nla.c.

References BKE_nlastrips_sort_strips(), ELEM, ListBase::first, NULL, 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 own F-Curves.

Definition at line 1503 of file nla.c.

References BKE_nlatrack_has_animated_strips(), ELEM, ListBase::first, NlaTrack::next, NULL, and tracks.