Blender V4.3
blender::dna::array Namespace Reference

Functions

template<typename T>
void remove_index (T **items, int *items_num, int *active_index, const int index, void(*destruct_item)(T *))
template<typename T>
void clear (T **items, int *items_num, int *active_index, void(*destruct_item)(T *))
template<typename T>
void move_index (T *items, const int items_num, const int from_index, const int to_index)

Function Documentation

◆ clear()

template<typename T>
void blender::dna::array::clear ( T ** items,
int * items_num,
int * active_index,
void(* destruct_item )(T *) )
inline

Removes all elements from an array and frees it.

Definition at line 58 of file DNA_array_utils.hh.

References MEM_SAFE_FREE, and T.

Referenced by blender::ed::object::bake_simulation::clear_data_block_references(), and blender::animrig::ChannelBag::fcurves_clear().

◆ move_index()

template<typename T>
void blender::dna::array::move_index ( T * items,
const int items_num,
const int from_index,
const int to_index )
inline

Moves one element from one index to another, moving other elements if necessary.

Definition at line 75 of file DNA_array_utils.hh.

References BLI_assert, T, and UNUSED_VARS_NDEBUG.

Referenced by blender::nodes::socket_items::ops::add_item(), and blender::nodes::socket_items::ops::move_active_item().

◆ remove_index()