Blender V4.3
blender::bke::nla Namespace Reference

Functions

bool foreach_strip (ID *id, blender::FunctionRef< bool(NlaStrip *)> callback)
 
bool foreach_strip_adt (const AnimData &adt, blender::FunctionRef< bool(NlaStrip *)> callback)
 

Function Documentation

◆ foreach_strip()

bool blender::bke::nla::foreach_strip ( ID * id,
blender::FunctionRef< bool(NlaStrip *)> callback )

Call the callback for every strip of this ID's NLA.

Automatically recurses into meta-strips.

The callback should return a 'keep going' status, i.e. true to keep looping, and false to break the loop.

Returns
the last value returned by the callback, so true if the loop ran until the end, and false it was stopped by the callback. When there is no NLA or it has no strips, returns true because the loop ran until its natural end and wasn't stopped by the callback.

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

References BKE_animdata_from_id(), callback, and foreach_strip_adt().

◆ foreach_strip_adt()

bool blender::bke::nla::foreach_strip_adt ( const AnimData & adt,
blender::FunctionRef< bool(NlaStrip *)> callback )

Call the callback for every strip of this AnimData's NLA.

Automatically recurses into meta-strips.

The callback should return a 'keep going' status, i.e. true to keep looping, and false to break the loop.

Returns
the last value returned by the callback, so true if the loop ran until the end, and false it was stopped by the callback. When there is no NLA or it has no strips, returns true because the loop ran until its natural end and wasn't stopped by the callback.

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

References callback, LISTBASE_FOREACH, AnimData::nla_tracks, NlaStrip::strips, and visit_strip().

Referenced by blender::animrig::foreach_action_slot_use_with_references(), and foreach_strip().