Core: add BKE_lib_query_foreachid_process_main_get() function
Add a function to get the `Main *bmain` pointer from a LibraryForeachIDData struct. Since the struct is opaque to the `..._foreach_id` functions, a separate function like this is necessary to get that pointer. Not used yet, but will be in a followup commit. Pull Request: https://projects.blender.org/blender/blender/pulls/123187
This commit is contained in:
@@ -237,6 +237,7 @@ enum {
|
||||
bool BKE_lib_query_foreachid_iter_stop(const LibraryForeachIDData *data);
|
||||
void BKE_lib_query_foreachid_process(LibraryForeachIDData *data, ID **id_pp, int cb_flag);
|
||||
int BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data);
|
||||
Main *BKE_lib_query_foreachid_process_main_get(const LibraryForeachIDData *data);
|
||||
int BKE_lib_query_foreachid_process_callback_flag_override(LibraryForeachIDData *data,
|
||||
int cb_flag,
|
||||
bool do_replace);
|
||||
|
||||
@@ -122,6 +122,11 @@ int BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
|
||||
return data->flag;
|
||||
}
|
||||
|
||||
Main *BKE_lib_query_foreachid_process_main_get(const LibraryForeachIDData *data)
|
||||
{
|
||||
return data->bmain;
|
||||
}
|
||||
|
||||
int BKE_lib_query_foreachid_process_callback_flag_override(LibraryForeachIDData *data,
|
||||
const int cb_flag,
|
||||
const bool do_replace)
|
||||
|
||||
Reference in New Issue
Block a user