Blender V5.0
BKE_bpath.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12/* TODO: Make this module handle a bit more safely string length, instead of assuming buffers are
13 * FILE_MAX length etc. */
14
15#pragma once
16
17#include "BLI_utildefines.h"
18
19struct ID;
20struct Main;
21struct ReportList;
22
25
77
79
93 char *path_dst,
94 size_t path_dst_maxncpy,
95 const char *path_src);
96
100
103
105
106 /* 'Private' data, caller don't need to set those. */
107
113
116
121};
122
125
128
130
133
134/* TODO: Investigate using macros around those calls to check a bit better about actual
135 * strings/buffers length (e,g, with static asserts). */
136
145 char *path,
146 size_t path_maxncpy);
147
158 char *path_dir,
159 size_t path_dir_maxncpy,
160 char *path_file,
161 size_t path_file_maxncpy);
162
173
175
178
180void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports);
181
184 int count_total = 0;
187};
188
189void BKE_bpath_summary_report(const BPathSummary &summary, ReportList *reports);
190
205 const char *searchpath,
206 ReportList *reports,
207 bool find_all);
208
211 const char *basedir_src,
212 const char *basedir_dst,
213 ReportList *reports,
214 BPathSummary *r_summary = nullptr);
215
218 const char *basedir,
219 ReportList *reports,
220 BPathSummary *r_summary = nullptr);
221
224 const char *basedir,
225 ReportList *reports,
226 BPathSummary *r_summary = nullptr);
227
234
242void BKE_bpath_list_restore(Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
243
250void BKE_bpath_list_free(void *path_list_handle);
251
void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:618
bool BKE_bpath_foreach_path_dirfile_fixed_process(BPathForeachPathData *bpath_data, char *path_dir, size_t path_dir_maxncpy, char *path_file, size_t path_file_maxncpy)
Definition bpath.cc:156
void * BKE_bpath_list_backup(Main *bmain, eBPathForeachFlag flag)
Definition bpath.cc:692
void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:627
void BKE_bpath_summary_report(const BPathSummary &summary, ReportList *reports)
Definition bpath.cc:59
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
Definition bpath.cc:125
void BKE_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports, bool find_all)
Definition bpath.cc:407
void BKE_bpath_foreach_path_id(BPathForeachPathData *bpath_data, ID *id)
Definition bpath.cc:75
bool(*)(BPathForeachPathData *bpath_data, char *path_dst, size_t path_dst_maxncpy, const char *path_src) BPathForeachPathFunctionCallback
Definition BKE_bpath.hh:92
void BKE_bpath_list_restore(Main *bmain, eBPathForeachFlag flag, void *path_list_handle)
Definition bpath.cc:706
void BKE_bpath_relative_rebase(Main *bmain, const char *basedir_src, const char *basedir_dst, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:478
eBPathForeachFlag
Definition BKE_bpath.hh:32
@ BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES
Definition BKE_bpath.hh:55
@ BKE_BPATH_FOREACH_PATH_SKIP_LINKED
Definition BKE_bpath.hh:40
@ BKE_BPATH_FOREACH_PATH_ABSOLUTE
Definition BKE_bpath.hh:38
@ BKE_BPATH_FOREACH_PATH_SKIP_PACKED
Definition BKE_bpath.hh:42
@ BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE
Definition BKE_bpath.hh:69
@ BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN
Definition BKE_bpath.hh:47
@ BKE_BPATH_FOREACH_PATH_RELOAD_EDITED
Definition BKE_bpath.hh:74
void BKE_bpath_list_free(void *path_list_handle)
Definition bpath.cc:718
void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports)
Definition bpath.cc:255
bool BKE_bpath_foreach_path_allocated_process(BPathForeachPathData *bpath_data, char **path)
Definition bpath.cc:187
void BKE_bpath_foreach_path_main(BPathForeachPathData *bpath_data)
Definition bpath.cc:116
#define ENUM_OPERATORS(_type, _max)
const char * absolute_base_path
Definition BKE_bpath.hh:112
eBPathForeachFlag flag
Definition BKE_bpath.hh:102
BPathForeachPathFunctionCallback callback_function
Definition BKE_bpath.hh:101
Definition DNA_ID.h:414
uint8_t flag
Definition wm_window.cc:145