Blender V4.5
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
69
71
85 char *path_dst,
86 size_t path_dst_maxncpy,
87 const char *path_src);
88
92
95
96 void *user_data;
97
98 /* 'Private' data, caller don't need to set those. */
99
105
108
113};
114
117
120
122
125
126/* TODO: Investigate using macros around those calls to check a bit better about actual
127 * strings/buffers length (e,g, with static asserts). */
128
137 char *path,
138 size_t path_maxncpy);
139
150 char *path_dir,
151 size_t path_dir_maxncpy,
152 char *path_file,
153 size_t path_file_maxncpy);
154
165
167
170
173
176 int count_total = 0;
179};
180
182
197 const char *searchpath,
199 bool find_all);
200
203 const char *basedir_src,
204 const char *basedir_dst,
206 BPathSummary *r_summary = nullptr);
207
210 const char *basedir,
212 BPathSummary *r_summary = nullptr);
213
216 const char *basedir,
218 BPathSummary *r_summary = nullptr);
219
226
234void BKE_bpath_list_restore(Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
235
242void BKE_bpath_list_free(void *path_list_handle);
243
void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:617
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:691
void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:626
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:406
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:84
void BKE_bpath_list_restore(Main *bmain, eBPathForeachFlag flag, void *path_list_handle)
Definition bpath.cc:705
void BKE_bpath_relative_rebase(Main *bmain, const char *basedir_src, const char *basedir_dst, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:477
eBPathForeachFlag
Definition BKE_bpath.hh:27
@ BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES
Definition BKE_bpath.hh:47
@ BKE_BPATH_FOREACH_PATH_SKIP_LINKED
Definition BKE_bpath.hh:35
@ BKE_BPATH_FOREACH_PATH_ABSOLUTE
Definition BKE_bpath.hh:33
@ BKE_BPATH_FOREACH_PATH_SKIP_PACKED
Definition BKE_bpath.hh:37
@ BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE
Definition BKE_bpath.hh:61
@ BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN
Definition BKE_bpath.hh:39
@ BKE_BPATH_FOREACH_PATH_RELOAD_EDITED
Definition BKE_bpath.hh:66
void BKE_bpath_list_free(void *path_list_handle)
Definition bpath.cc:717
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)
ReportList * reports
Definition WM_types.hh:1025
const char * absolute_base_path
Definition BKE_bpath.hh:104
eBPathForeachFlag flag
Definition BKE_bpath.hh:94
BPathForeachPathFunctionCallback callback_function
Definition BKE_bpath.hh:93
Definition DNA_ID.h:404
uint8_t flag
Definition wm_window.cc:139