Blender
V3.3
|
Utilities ensuring .blend
file (i.e. Main) is in valid state during write and/or read process.
More...
Go to the source code of this file.
Functions | |
bool | BLO_main_validate_libraries (struct Main *bmain, struct ReportList *reports) |
bool | BLO_main_validate_shapekeys (struct Main *bmain, struct ReportList *reports) |
void | BLO_main_validate_embedded_liboverrides (struct Main *bmain, struct ReportList *reports) |
Utilities ensuring .blend
file (i.e. Main) is in valid state during write and/or read process.
Definition in file BLO_blend_validate.h.
void BLO_main_validate_embedded_liboverrides | ( | struct Main * | bmain, |
struct ReportList * | reports | ||
) |
Check that the LIB_EMBEDDED_DATA_LIB_OVERRIDE
flag for embedded IDs actually matches reality of embedded IDs being used by a liboverride ID.
This is needed because embedded IDs did not get their flag properly cleared when runtime data was split in ID.tag
, which can create crashing situations in some rare cases, see #117795.
Referenced by after_liblink_merged_bmain_process().
bool BLO_main_validate_libraries | ( | struct Main * | bmain, |
struct ReportList * | reports | ||
) |
Check (but do not fix) that all linked data-blocks are still valid (i.e. pointing to the right library).
Definition at line 39 of file blend_validate.c.
References BKE_library_filepath_set(), BKE_main_lock(), BKE_main_unlock(), BKE_report(), BKE_reportf(), BLI_assert, BLI_linklist_freeN(), BLI_listbase_is_single(), BLO_blendhandle_close(), BLO_blendhandle_from_file(), BLO_blendhandle_get_datablock_names(), blo_join_main(), blo_split_main(), Library::filepath, Library::filepath_abs, ListBase::first, GS, id, Library::id, ID_IS_LINKED, ID_LI, if(), INDEX_ID_MAX, is_valid, ID::lib, LinkNode::link, ID::name, names, Main::next, LinkNode::next, NULL, BlendFileReadReport::reports, RPT_ERROR, set_listbasepointers(), and STREQ.
Referenced by BLO_write_file(), ed_undo_step_post(), and ed_undo_step_pre().
bool BLO_main_validate_shapekeys | ( | struct Main * | bmain, |
struct ReportList * | reports | ||
) |
Definition at line 153 of file blend_validate.c.
References BKE_id_delete(), BKE_key_from_id(), BKE_key_idtype_support(), BKE_main_lock(), BKE_main_unlock(), BKE_reportf(), FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, Key::from, GS, id, Key::id, ID_IS_LINKED, is_valid, LISTBASE_FOREACH_MUTABLE, ID::name, NULL, RPT_ERROR, and Main::shapekeys.
Referenced by after_liblink_merged_bmain_process(), and BLO_write_file().