|
Blender V5.0
|
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 | remove_if (T **items, int *items_num, FunctionRef< bool(const T &)> predicate, 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) |
|
inline |
Removes all elements from an array and frees it.
Definition at line 83 of file DNA_array_utils.hh.
References i, MEM_SAFE_FREE, and T.
Referenced by blender::ed::object::bake_simulation::clear_data_block_references(), and blender::animrig::Channelbag::fcurves_clear().
|
inline |
Moves one element from one index to another, moving other elements if necessary.
Definition at line 100 of file DNA_array_utils.hh.
References BLI_assert, i, T, and UNUSED_VARS_NDEBUG.
Referenced by blender::nodes::socket_items::ops::add_item(), blender::ed::space_node::viewer_linking::ensure_geometry_nodes_viewer_has_non_geometry_socket(), blender::ed::space_node::viewer_linking::ensure_geometry_nodes_viewer_starts_with_geometry_socket(), blender::nodes::socket_items::ops::move_active_item(), blender::ed::spreadsheet::reorder_columns_modal(), and blender::ed::spreadsheet::spreadsheet_table_move_to_front().
|
inline |
Removes all elements for which the predicate is true. The remaining ones stay in the order they were in before.
Definition at line 62 of file DNA_array_utils.hh.
References blender::IndexRange::from_begin_end(), i, and T.
Referenced by blender::ed::spreadsheet::spreadsheet_table_remove_unused(), and blender::ed::spreadsheet::spreadsheet_table_remove_unused_columns().
|
inline |
Removes an element from the array and shifts the elements after it towards the front.
Definition at line 27 of file DNA_array_utils.hh.
References BLI_assert, MEM_calloc_arrayN(), MEM_freeN(), and T.
Referenced by blender::animrig::StripKeyframeData::channelbag_remove(), blender::ed::object::dash_modifier_segment_remove_exec(), blender::animrig::Channelbag::fcurve_detach_by_index(), blender::animrig::Action::layer_remove(), blender::nodes::socket_items::ops::remove_active_item(), blender::nodes::socket_items::ops::remove_item_by_index(), blender::animrig::Action::slot_remove(), blender::animrig::Layer::strip_remove(), and blender::ed::object::time_modifier_segment_remove_exec().