|
Blender
V2.93
|
Utils 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) |
Utils ensuring .blend file (i.e. Main) is in valid state during write and/or read process.
Definition in file BLO_blend_validate.h.
| bool BLO_main_validate_libraries | ( | Main * | bmain, |
| 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 54 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_LI, if(), INDEX_ID_MAX, is_valid, ID::lib, LinkNode::link, ID::name, names, Main::next, LinkNode::next, NULL, 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 | ( | Main * | bmain, |
| ReportList * | reports | ||
| ) |
Check (and fix if needed) that shape key's 'from' pointer is valid.
Definition at line 168 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, is_valid, ID::lib, LISTBASE_FOREACH_MUTABLE, ID::name, NULL, RPT_ERROR, and Main::shapekeys.
Referenced by after_liblink_merged_bmain_process(), and BLO_write_file().