51 int i = lbarray.size();
53 for (
ID *
id =
static_cast<ID *
>(lbarray[
i]->first);
id !=
nullptr;
54 id =
static_cast<ID *
>(
id->next))
60 "ID %s is in local database while being linked from library %s!",
67 for (
Main *curmain = bmain->
next; curmain !=
nullptr; curmain = curmain->
next) {
68 Library *curlib = curmain->curlib;
69 if (curlib ==
nullptr) {
82 "Library ID %s not found at expected path %s!",
91 ID *
id =
static_cast<ID *
>(lbarray[
i]->first);
100 "Library ID %s in library %s, this should not happen!",
108 for (;
id !=
nullptr;
id =
static_cast<ID *
>(
id->next)) {
113 "ID %s has null lib pointer while being in library %s!",
118 if (id->
lib != curlib) {
125 for (; name; name = name->
next) {
126 const char *str_name = (
const char *)name->
link;
127 if (id->
name[2] == str_name[0] &&
STREQ(str_name, id->
name + 2)) {
132 if (name ==
nullptr) {
136 "ID %s not found in library %s anymore!",
163 bool is_valid =
true;
175 if (shapekey !=
nullptr && shapekey->
from !=
id) {
179 "ID %s uses shapekey %s, but its 'from' pointer is invalid (%p), fixing...",
196 if (shapekey->from !=
nullptr) {
202 "Shapekey %s has an invalid 'from' pointer (%p), it will be deleted",
228 Scene *scene =
reinterpret_cast<Scene *
>(id_iter);
245 &
LOG,
"ID %s is flagged as embedded, while existing in Main data-base", id_iter->
name);
253 "ID %s has an embedded nodetree which is not flagged as embedded",
260 Scene *scene =
reinterpret_cast<Scene *
>(id_iter);
265 "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
MainListsArray BKE_main_lists_get(Main &bmain)
#define FOREACH_MAIN_LISTBASE_ID_END
std::array< ListBase *, INDEX_ID_MAX - 1 > MainListsArray
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id)
#define FOREACH_MAIN_LISTBASE_END
void BKE_main_lock(Main *bmain)
#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 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,...)
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
Object groups, one object can be in many groups at once.
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)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
bNodeTree * node_tree_from_id(ID *id)
void blo_split_main(ListBase *mainlist, Main *main)
void blo_join_main(ListBase *mainlist)
LibraryRuntimeHandle * runtime
struct Collection * master_collection