147 data->count_changed++;
154 data->count_failed++;
163 const char *basedir_src,
164 const char *basedir_dst,
173 data.basedir_src = basedir_src;
174 data.basedir_dst = basedir_dst;
175 data.reports = reports;
181 "Total files %d | Changed %d | Failed %d",
212 strcpy(path_dst, path_src);
215 data->count_changed++;
219 data->count_failed++;
229 if (basedir[0] ==
'\0') {
234 data.basedir = basedir;
235 data.reports = reports;
241 "Total files %d | Changed %d | Failed %d",
263 strcpy(path_dst, path_src);
266 data->count_changed++;
270 data->count_failed++;
281 if (basedir[0] ==
'\0') {
286 data.basedir = basedir;
287 data.reports = reports;
293 "Total files %d | Changed %d | Failed %d",
317 const char *filename,
335 if (*r_filesize == -1) {
347 if (
BLI_stat(path, &status) == -1) {
354 size = status.st_size;
355 if ((
size > 0) && (
size > *r_filesize)) {
362 else if (
S_ISDIR(status.st_mode)) {
366 filename_new, path, filename, r_filesize, r_recur_depth);
391 if (
data->find_all ==
false) {
397 filename_new[0] =
'\0';
402 if (filesize == -1) {
405 "Could not open directory '%s'",
409 if (found ==
false) {
412 "Could not find '%s' in '%s'",
431 const char *searchpath,
440 data.searchdir = searchpath;
461 const char *path_src;
465 BLI_strncpy(path_src_buf, path,
sizeof(path_src_buf));
467 path_src = path_src_buf;
476 if (visit_cb(userdata, path_dst, path_src)) {
502 if (visit_cb(userdata, path_dst, (
const char *)path_src)) {
516 const char *path_src;
520 BLI_strncpy(path_src_buf, *path,
sizeof(path_src_buf));
522 path_src = path_src_buf;
528 if (visit_cb(userdata, path_dst, path_src)) {
584 #define BPATH_TRAVERSE_POINTCACHE(ptcaches) \
587 for (cache = (ptcaches).first; cache; cache = cache->next) { \
588 if (cache->flag & PTCACHE_DISK_CACHE) { \
589 rewrite_path_fixed(cache->path, visit_cb, absbase, bpath_user_data); \
630 #undef BPATH_TRAVERSE_POINTCACHE
649 if (((
Text *)
id)->filepath) {
712 seq->
strip->
dir, se->
name, visit_cb, absbase, bpath_user_data);
724 for (i = 0; i <
len; i++, se++) {
726 seq->
strip->
dir, se->
name, visit_cb, absbase, bpath_user_data);
784 void *bpath_user_data)
801 const char *base_new = ((
char **)pathbase_v)[0];
802 const char *base_old = ((
char **)pathbase_v)[1];
805 CLOG_ERROR(&
LOG,
"old base path '%s' is not absolute.", base_old);
842 size_t path_size = strlen(path_src) + 1;
844 char *filepath = (
char *)(path_store + 1);
846 memcpy(filepath, path_src, path_size);
857 const char *filepath = (
char *)(path_store + 1);
860 if (
STREQ(path_src, filepath)) {
@ BKE_BPATH_TRAVERSE_SKIP_MULTIFILE
@ BKE_BPATH_TRAVERSE_SKIP_LIBRARY
@ BKE_BPATH_TRAVERSE_SKIP_PACKED
@ BKE_BPATH_TRAVERSE_RELOAD_EDITED
bool(* BPathVisitor)(void *userdata, char *path_dst, const char *path_src)
bool BKE_vfont_is_builtin(struct VFont *vfont)
bool BKE_image_has_packedfile(struct Image *image)
bool BKE_image_is_dirty(struct Image *image)
#define IMA_SIGNAL_RELOAD
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
void BKE_library_filepath_set(struct Main *bmain, struct Library *lib, const char *filepath)
int set_listbasepointers(struct Main *main, struct ListBase *lb[])
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_stat(const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
const char * BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_is_rel(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void BLI_path_normalize(const char *relabase, char *path) ATTR_NONNULL(2)
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
#define FILENAME_IS_CURRPAR(_n)
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Compatibility-like things for windows.
const char * dirname(char *path)
struct dirent * readdir(DIR *dp)
DIR * opendir(const char *path)
#define CLOG_ERROR(clg_ref,...)
#define ID_IS_LINKED(_id)
#define ID_BLEND_PATH(_bmain, _id)
@ eModifierType_MeshCache
Object is a sort of wrapper for general info.
#define SEQ_HAS_PATH(_seq)
Read Guarded memory(de)allocation.
#define SEQ_ALL_BEGIN(ed, _seq)
void BKE_bpath_relative_rebase(Main *bmain, const char *basedir_src, const char *basedir_dst, ReportList *reports)
void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports)
static bool missing_files_find__recursive(char *filename_new, const char *dirname, const char *filename, int64_t *r_filesize, int *r_recur_depth)
#define BPATH_TRAVERSE_POINTCACHE(ptcaches)
static bool bpath_absolute_convert_visit_cb(void *userdata, char *path_dst, const char *path_src)
static bool bpath_relative_convert_visit_cb(void *userdata, char *path_dst, const char *path_src)
static bool rewrite_path_fixed_dirfile(char path_dir[FILE_MAXDIR], char path_file[FILE_MAXFILE], BPathVisitor visit_cb, const char *absbase, void *userdata)
void BKE_bpath_list_restore(Main *bmain, const int flag, void *ls_handle)
static bool rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *absbase, void *userdata)
void BKE_bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports)
void BKE_bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
struct BPathRemap_Data BPathRemap_Data
static bool bpath_list_restore(void *userdata, char *path_dst, const char *path_src)
void * BKE_bpath_list_backup(Main *bmain, const int flag)
static bool checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), const char *path_src)
struct BPathRebase_Data BPathRebase_Data
void BKE_bpath_list_free(void *ls_handle)
static bool bpath_list_append(void *userdata, char *UNUSED(path_dst), const char *path_src)
static bool rewrite_path_fixed(char *path, BPathVisitor visit_cb, const char *absbase, void *userdata)
struct BPathFind_Data BPathFind_Data
bool BKE_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
static bool missing_files_find__visit_cb(void *userdata, char *path_dst, const char *path_src)
void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports)
static bool bpath_relative_rebase_visit_cb(void *userdata, char *path_dst, const char *path_src)
void BKE_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports, const bool find_all)
void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
CustomDataExternal * external
char cache_directory[1024]
struct FluidDomainSettings * domain
struct FluidsimSettings * fss
struct bNodeTree * nodetree
struct CustomData pdata ldata
struct ModifierData * next
struct ParticleSystem * next
struct SoftBody_Shared * shared
struct PackedFile * packedfile
struct PackedFile * packedfile
struct PackedFile * packedfile