Blender
V3.3
|
#include <string.h>
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "MEM_guardedalloc.h"
#include "DNA_collection_types.h"
#include "DNA_key_types.h"
#include "DNA_node_types.h"
#include "DNA_sdna_types.h"
#include "DNA_windowmanager_types.h"
#include "BKE_key.h"
#include "BKE_lib_id.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BLO_blend_validate.h"
#include "BLO_readfile.h"
#include "readfile.h"
Go to the source code of this file.
Functions | |
bool | BLO_main_validate_libraries (Main *bmain, ReportList *reports) |
bool | BLO_main_validate_shapekeys (Main *bmain, ReportList *reports) |
void | BLO_main_validate_embedded_liboverrides (Main *bmain, ReportList *UNUSED(reports)) |
Utils to check/validate a Main is in sane state, only checks relations between data-blocks and libraries for now.
Definition in file blend_validate.c.
void BLO_main_validate_embedded_liboverrides | ( | Main * | bmain, |
ReportList * | UNUSEDreports | ||
) |
Definition at line 205 of file blend_validate.c.
References ID::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, Collection::id, ID_IS_OVERRIDE_LIBRARY, ID_SCE, LIB_EMBEDDED_DATA_LIB_OVERRIDE, Scene::master_collection, ID::name, ntreeFromID(), and scene.
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().