57 for (
ID *
id =
static_cast<ID *
>(lbarray[i]->first);
id !=
nullptr;
58 id =
static_cast<ID *
>(
id->next))
64 "ID %s is in local database while being linked from library %s!",
71 for (
Main *curmain = bmain->
next; curmain !=
nullptr; curmain = curmain->next) {
72 Library *curlib = curmain->curlib;
73 if (curlib ==
nullptr) {
86 "Library ID %s not found at expected path %s!",
94 ID *
id =
static_cast<ID *
>(lbarray[i]->
first);
103 "Library ID %s in library %s, this should not happen!",
111 for (;
id !=
nullptr;
id =
static_cast<ID *
>(
id->next)) {
116 "ID %s has null lib pointer while being in library %s!",
121 if (id->lib != curlib) {
128 for (; name; name = name->next) {
129 const char *str_name = (
const char *)name->
link;
130 if (id->name[2] == str_name[0] &&
STREQ(str_name, id->name + 2)) {
135 if (name ==
nullptr) {
139 "ID %s not found in library %s anymore!",
178 if (shapekey !=
nullptr && shapekey->
from !=
id) {
182 "ID %s uses shapekey %s, but its 'from' pointer is invalid (%p), fixing...",
199 if (shapekey->from !=
nullptr) {
205 "Shapekey %s has an invalid 'from' pointer (%p), it will be deleted",
225 node_tree->id.flag &= ~ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE;
231 Scene *scene =
reinterpret_cast<Scene *
>(id_iter);
232 if (scene->master_collection &&
248 &
LOG,
"ID %s is flagged as embedded, while existing in Main data-base", id_iter->
name);
249 id_iter->
flag &= ~ID_FLAG_EMBEDDED_DATA;
256 "ID %s has an embedded nodetree which is not flagged as embedded",
263 Scene *scene =
reinterpret_cast<Scene *
>(id_iter);
264 if (scene->master_collection &&
268 "ID %s has an embedded Collection which is not flagged as embedded",
Key * BKE_key_from_id(ID *id)
bool BKE_key_idtype_support(short id_type)
void BKE_id_delete_ex(Main *bmain, void *idv, const int extra_remapping_flags) ATTR_NONNULL(1
@ ID_REMAP_FORCE_UI_POINTERS
void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_LISTBASE_ID_END
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id)
#define FOREACH_MAIN_LISTBASE_END
void BKE_main_lock(Main *bmain)
int set_listbasepointers(Main *bmain, ListBase *lb[])
#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb)
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
void BKE_main_unlock(Main *bmain)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BLI_linklist_freeN(LinkNode *list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
Utilities ensuring .blend file (i.e. Main) is in valid state during write and/or read process.
external readfile function prototypes.
BlendHandle * BLO_blendhandle_from_file(const char *filepath, BlendFileReadReport *reports)
void BLO_blendhandle_close(BlendHandle *bh) ATTR_NONNULL(1)
LinkNode * BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, bool use_assets_only, int *r_tot_names)
#define CLOG_ERROR(clg_ref,...)
#define ID_IS_LINKED(_id)
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object groups, one object can be in many groups at once.
Read Guarded memory(de)allocation.
void BLO_main_validate_embedded_liboverrides(Main *bmain, ReportList *)
void BLO_main_validate_embedded_flag(Main *bmain, ReportList *)
bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
bool BLO_main_validate_shapekeys(Main *bmain, ReportList *reports)
bNodeTree * node_tree_from_id(ID *id)
void blo_split_main(ListBase *mainlist, Main *main)
void blo_join_main(ListBase *mainlist)
struct Library_Runtime runtime
struct Collection * master_collection