Blender V5.0
UnusedIDsData Struct Reference

Public Member Functions

 UnusedIDsData (Main *bmain, const int id_tag, LibQueryUnusedIDsData &parameters)
void reset (const bool do_local_ids, const bool do_linked_ids, const bool do_recursive, std::array< int, INDEX_ID_MAX > &num_total, std::array< int, INDEX_ID_MAX > &num_local, std::array< int, INDEX_ID_MAX > &num_linked)

Public Attributes

Mainbmain
const int id_tag
bool do_local_ids
bool do_linked_ids
bool do_recursive
blender::FunctionRef< bool(ID *id)> filter_fn
std::array< int, INDEX_ID_MAX > * num_total
std::array< int, INDEX_ID_MAX > * num_local
std::array< int, INDEX_ID_MAX > * num_linked
blender::Set< ID * > unused_ids

Detailed Description

Internal data for the common processing of the 'unused IDs' query functions.

While LibQueryUnusedIDsData is a subset of this internal struct, they need to be kept separate, since this struct is used with partially 'enforced' values for some parameters by the BKE_lib_query_unused_ids_amounts code. This allows the computation of predictive amounts for user feedback ('what would be the amounts of IDs detected as unused if this option was enabled').

Definition at line 681 of file lib_query.cc.

Constructor & Destructor Documentation

◆ UnusedIDsData()

UnusedIDsData::UnusedIDsData ( Main * bmain,
const int id_tag,
LibQueryUnusedIDsData & parameters )
inline

Member Function Documentation

◆ reset()

void UnusedIDsData::reset ( const bool do_local_ids,
const bool do_linked_ids,
const bool do_recursive,
std::array< int, INDEX_ID_MAX > & num_total,
std::array< int, INDEX_ID_MAX > & num_local,
std::array< int, INDEX_ID_MAX > & num_linked )
inline

Definition at line 711 of file lib_query.cc.

References do_linked_ids, do_local_ids, do_recursive, num_linked, num_local, num_total, and unused_ids.

Member Data Documentation

◆ bmain

Main* UnusedIDsData::bmain

Definition at line 682 of file lib_query.cc.

Referenced by UnusedIDsData().

◆ do_linked_ids

bool UnusedIDsData::do_linked_ids

Definition at line 687 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ do_local_ids

bool UnusedIDsData::do_local_ids

Definition at line 686 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ do_recursive

bool UnusedIDsData::do_recursive

Definition at line 688 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ filter_fn

blender::FunctionRef<bool(ID *id)> UnusedIDsData::filter_fn

Definition at line 690 of file lib_query.cc.

Referenced by UnusedIDsData().

◆ id_tag

const int UnusedIDsData::id_tag

Definition at line 684 of file lib_query.cc.

Referenced by UnusedIDsData().

◆ num_linked

std::array<int, INDEX_ID_MAX>* UnusedIDsData::num_linked

Definition at line 694 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ num_local

std::array<int, INDEX_ID_MAX>* UnusedIDsData::num_local

Definition at line 693 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ num_total

std::array<int, INDEX_ID_MAX>* UnusedIDsData::num_total

Definition at line 692 of file lib_query.cc.

Referenced by reset(), and UnusedIDsData().

◆ unused_ids

blender::Set<ID *> UnusedIDsData::unused_ids

Definition at line 696 of file lib_query.cc.

Referenced by reset().


The documentation for this struct was generated from the following file: