|
Blender
V2.93
|
Go to the source code of this file.
Typedefs | |
| typedef bool(* | BPathVisitor) (void *userdata, char *path_dst, const char *path_src) |
Enumerations | |
| enum | { BKE_BPATH_TRAVERSE_ABS = (1 << 0) , BKE_BPATH_TRAVERSE_SKIP_LIBRARY = (1 << 1) , BKE_BPATH_TRAVERSE_SKIP_PACKED = (1 << 2) , BKE_BPATH_TRAVERSE_SKIP_MULTIFILE = (1 << 3) , BKE_BPATH_TRAVERSE_RELOAD_EDITED = (1 << 4) } |
Functions | |
| void | BKE_bpath_traverse_id (struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data) |
| void | BKE_bpath_traverse_id_list (struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data) |
| void | BKE_bpath_traverse_main (struct Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data) |
| bool | BKE_bpath_relocate_visitor (void *oldbasepath, char *path_dst, const char *path_src) |
| void * | BKE_bpath_list_backup (struct Main *bmain, const int flag) |
| void | BKE_bpath_list_restore (struct Main *bmain, const int flag, void *ls_handle) |
| void | BKE_bpath_list_free (void *ls_handle) |
| void | BKE_bpath_missing_files_check (struct Main *bmain, struct ReportList *reports) |
| void | BKE_bpath_missing_files_find (struct Main *bmain, const char *searchpath, struct ReportList *reports, const bool find_all) |
| void | BKE_bpath_relative_rebase (struct Main *bmain, const char *basedir_src, const char *basedir_dst, struct ReportList *reports) |
| void | BKE_bpath_relative_convert (struct Main *bmain, const char *basedir, struct ReportList *reports) |
| void | BKE_bpath_absolute_convert (struct Main *bmain, const char *basedir, struct ReportList *reports) |
Definition in file BKE_bpath.h.
| typedef bool(* BPathVisitor) (void *userdata, char *path_dst, const char *path_src) |
Definition at line 36 of file BKE_bpath.h.
| anonymous enum |
| Enumerator | |
|---|---|
| BKE_BPATH_TRAVERSE_ABS | |
| BKE_BPATH_TRAVERSE_SKIP_LIBRARY | |
| BKE_BPATH_TRAVERSE_SKIP_PACKED | |
| BKE_BPATH_TRAVERSE_SKIP_MULTIFILE | |
| BKE_BPATH_TRAVERSE_RELOAD_EDITED | |
Definition at line 59 of file BKE_bpath.h.
| void BKE_bpath_absolute_convert | ( | struct Main * | bmain, |
| const char * | basedir, | ||
| struct ReportList * | reports | ||
| ) |
Definition at line 276 of file bpath.c.
References BKE_bpath_traverse_main(), BKE_BPATH_TRAVERSE_SKIP_LIBRARY, BKE_reportf(), bpath_absolute_convert_visit_cb(), CLOG_ERROR, data, LOG, NULL, RPT_INFO, and RPT_WARNING.
Referenced by BLO_write_file(), and make_paths_absolute_exec().
| void* BKE_bpath_list_backup | ( | struct Main * | bmain, |
| const int | flag | ||
| ) |
Definition at line 873 of file bpath.c.
References BKE_bpath_traverse_main(), bpath_list_append(), and MEM_callocN.
Referenced by BKE_blendfile_write_partial(), and BLO_write_file().
| void BKE_bpath_list_free | ( | void * | ls_handle | ) |
Definition at line 889 of file bpath.c.
References BLI_assert, BLI_freelistN(), BLI_listbase_is_empty(), and MEM_freeN.
Referenced by BKE_blendfile_write_partial(), and BLO_write_file().
| void BKE_bpath_list_restore | ( | struct Main * | bmain, |
| const int | flag, | ||
| void * | ls_handle | ||
| ) |
Definition at line 882 of file bpath.c.
References BKE_bpath_traverse_main(), and bpath_list_restore().
Referenced by BKE_blendfile_write_partial(), and BLO_write_file().
| void BKE_bpath_missing_files_check | ( | struct Main * | bmain, |
| struct ReportList * | reports | ||
| ) |
Definition at line 107 of file bpath.c.
References BKE_BPATH_TRAVERSE_ABS, BKE_bpath_traverse_main(), BKE_BPATH_TRAVERSE_SKIP_PACKED, and checkMissingFiles_visit_cb().
Referenced by report_missing_files_exec().
| void BKE_bpath_missing_files_find | ( | struct Main * | bmain, |
| const char * | searchpath, | ||
| struct ReportList * | reports, | ||
| const bool | find_all | ||
| ) |
Definition at line 430 of file bpath.c.
References BKE_BPATH_TRAVERSE_ABS, BKE_bpath_traverse_main(), BKE_BPATH_TRAVERSE_RELOAD_EDITED, BKE_main_blendfile_path(), data, BPathFind_Data::find_all, missing_files_find__visit_cb(), NULL, and BPathFind_Data::reports.
Referenced by find_missing_files_exec().
| void BKE_bpath_relative_convert | ( | struct Main * | bmain, |
| const char * | basedir, | ||
| struct ReportList * | reports | ||
| ) |
Definition at line 224 of file bpath.c.
References BKE_bpath_traverse_main(), BKE_BPATH_TRAVERSE_SKIP_LIBRARY, BKE_reportf(), bpath_relative_convert_visit_cb(), CLOG_ERROR, data, LOG, NULL, RPT_INFO, and RPT_WARNING.
Referenced by BLO_write_file(), and make_paths_relative_exec().
| void BKE_bpath_relative_rebase | ( | struct Main * | bmain, |
| const char * | basedir_src, | ||
| const char * | basedir_dst, | ||
| struct ReportList * | reports | ||
| ) |
Definition at line 162 of file bpath.c.
References BKE_bpath_traverse_main(), BKE_BPATH_TRAVERSE_SKIP_LIBRARY, BKE_BPATH_TRAVERSE_SKIP_MULTIFILE, BKE_reportf(), BLI_assert, bpath_relative_rebase_visit_cb(), data, NULL, RPT_INFO, and RPT_WARNING.
Referenced by BLO_write_file().
| bool BKE_bpath_relocate_visitor | ( | void * | pathbase_v, |
| char * | path_dst, | ||
| const char * | path_src | ||
| ) |
Rewrites a relative path to be relative to the main file - unless the path is absolute, in which case it is not altered.
Definition at line 797 of file bpath.c.
References BLI_path_abs(), BLI_path_is_rel(), BLI_path_normalize(), BLI_path_rel(), BLI_strncpy(), CLOG_ERROR, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, and LOG.
Referenced by lib_id_library_local_paths().
| void BKE_bpath_traverse_id | ( | Main * | bmain, |
| ID * | id, | ||
| BPathVisitor | visit_cb, | ||
| const int | flag, | ||
| void * | bpath_user_data | ||
| ) |
Run visitor function 'visit' on all paths contained in 'id'.
Definition at line 540 of file bpath.c.
References BKE_BPATH_TRAVERSE_ABS, BKE_BPATH_TRAVERSE_RELOAD_EDITED, BKE_BPATH_TRAVERSE_SKIP_LIBRARY, BKE_BPATH_TRAVERSE_SKIP_MULTIFILE, BKE_BPATH_TRAVERSE_SKIP_PACKED, BKE_image_has_packedfile(), BKE_image_is_dirty(), BKE_image_signal(), BKE_library_filepath_set(), BKE_vfont_is_builtin(), BPATH_TRAVERSE_POINTCACHE, FluidDomainSettings::cache_directory, OceanModifierData::cachepath, Strip::dir, FluidModifierData::domain, Scene::ed, ELEM, eModifierType_Cloth, eModifierType_Fluid, eModifierType_Fluidsim, eModifierType_MeshCache, eModifierType_Ocean, CustomData::external, CustomDataExternal::filename, CacheFile::filepath, Image::filepath, MeshCacheModifierData::filepath, MovieClip::filepath, NodeShaderScript::filepath, NodeShaderTexIES::filepath, bSound::filepath, Volume::filepath, ListBase::first, FluidsimModifierData::fss, GS, Brush::icon_filepath, id, ID_BLEND_PATH, ID_BR, ID_CF, ID_IM, ID_IS_LINKED, ID_LI, ID_MA, ID_MC, ID_ME, ID_NT, ID_OB, ID_SCE, ID_SO, ID_TXT, ID_VF, ID_VO, IMA_SIGNAL_RELOAD, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, Mesh::ldata, len, lib, MEM_allocN_len, MIN2, MOD_FLUID_TYPE_DOMAIN, Object::modifiers, StripElem::name, ID::name, ModifierData::next, ParticleSystem::next, node, bNodeTree::nodes, Material::nodetree, ntree, NTREE_SHADER, NULL, bSound::packedfile, VFont::packedfile, Volume::packedfile, Object::particlesystem, ClothModifierData::ptcaches, SoftBody_Shared::ptcaches, ParticleSystem::ptcaches, rewrite_path_alloc(), rewrite_path_fixed(), rewrite_path_fixed_dirfile(), scene, SEQ_ALL_BEGIN, SEQ_ALL_END, SEQ_HAS_PATH, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SH_NODE_SCRIPT, SH_NODE_TEX_IES, SoftBody::shared, Object::soft, Image::source, Sequence::strip, Strip::stripdata, FluidsimSettings::surfdataPath, ModifierData::type, FluidModifierData::type, bNodeTree::type, and Sequence::type.
Referenced by BKE_bpath_traverse_id_list(), and lib_id_library_local_paths().
| void BKE_bpath_traverse_id_list | ( | struct Main * | bmain, |
| struct ListBase * | lb, | ||
| BPathVisitor | visit_cb, | ||
| const int | flag, | ||
| void * | bpath_user_data | ||
| ) |
Definition at line 772 of file bpath.c.
References BKE_bpath_traverse_id(), ListBase::first, id, and ID::next.
Referenced by BKE_bpath_traverse_main().
| void BKE_bpath_traverse_main | ( | struct Main * | bmain, |
| BPathVisitor | visit_cb, | ||
| const int | flag, | ||
| void * | bpath_user_data | ||
| ) |
Definition at line 781 of file bpath.c.
References Freestyle::a, BKE_bpath_traverse_id_list(), INDEX_ID_MAX, and set_listbasepointers().
Referenced by BKE_bpath_absolute_convert(), BKE_bpath_list_backup(), BKE_bpath_list_restore(), BKE_bpath_missing_files_check(), BKE_bpath_missing_files_find(), BKE_bpath_relative_convert(), BKE_bpath_relative_rebase(), bpy_blend_paths(), and clean_paths().