71 readfile_reports.
reports = reports;
87 const short versionfile,
88 const short subversionfile)
105 const char *path_src)
107 strcpy(path_dst, path_src);
109 return !
STREQ(path_dst, path_src);
173 const bool is_startup =
params->is_startup;
198 if (mode != LOAD_UNDO) {
203 if (mode != LOAD_UNDO) {
210 if (mode != LOAD_UI) {
227 bool track_undo_scene;
237 if (mode != LOAD_UNDO) {
262 track_undo_scene = (mode == LOAD_UNDO && curscreen && curscene && bfd->
main->
wm.
first);
264 if (curscene ==
NULL) {
268 if (curscene ==
NULL) {
271 if (cur_view_layer ==
NULL) {
276 if (track_undo_scene) {
282 win->
scene = curscene;
288 curscene = win->
scene;
291 if (track_undo_scene) {
295 win->
scene = curscene;
318 if (mode != LOAD_UI) {
334 G.fileflags = (
G.fileflags & fileflags_keep) | (bfd->
fileflags & ~fileflags_keep);
400 if (mode == LOAD_UI) {
405 if (win->scene && win->scene != curscene) {
416 if (mode != LOAD_UNDO) {
422 if (mode != LOAD_UNDO) {
427 if (mode == LOAD_UNDO) {
476 "File written by newer Blender binary (%d.%d), expect loss of data!",
478 main->subversionfile);
487 const bool startup_update_defaults,
488 const char *startup_app_template)
492 "File could not be read, critical data corruption detected");
497 if (startup_update_defaults) {
519 if (
params->is_startup ==
false) {
520 printf(
"Read blend: %s\n",
filepath);
645 memcpy(userdef, &
U_default,
sizeof(*userdef));
649 const char *addons[] = {
662 for (
int i = 0; i <
ARRAY_SIZE(addons); i++) {
677 #ifdef WITH_PYTHON_SECURITY
736 if (userdef_default ==
NULL) {
759 printf(
"Writing userprefs: '%s' ",
filepath);
760 if (use_template_userpref) {
781 if (use_template_userpref) {
786 printf(
"Writing userprefs app-template: '%s' ",
filepath);
802 U.runtime.is_dirty =
false;
824 workspace_config =
MEM_callocN(
sizeof(*workspace_config), __func__);
836 return workspace_config;
904 const int write_flags,
905 const int remap_mode,
912 void *path_list_backup =
NULL;
928 ListBase *lb_dst = lbarray_dst[
a], *lb_src = lbarray_src[
a];
930 for (
id = lb_src->first;
id;
id = nextid) {
957 .remap_mode = remap_mode,
961 if (path_list_backup) {
971 ListBase *lb_dst = lbarray_dst[
a], *lb_src = lbarray_src[
a];
struct bAddon * BKE_addon_new(void)
bool BKE_appdir_font_folder_default(char *dir)
const char * BKE_appdir_folder_id_create(int folder_id, const char *subfolder)
#define BLENDER_USERPREF_FILE
bool BKE_appdir_app_template_has_userpref(const char *app_template)
void BKE_blender_globals_clear(void)
void BKE_blender_userdef_data_free(struct UserDef *userdef, bool clear_fonts)
void BKE_blender_userdef_data_set_and_free(struct UserDef *userdef)
void BKE_blender_userdef_app_template_data_swap(struct UserDef *userdef_a, struct UserDef *userdef_b)
#define BLENDER_FILE_SUBVERSION
#define BLENDER_FILE_VERSION
void * BKE_bpath_list_backup(struct Main *bmain, eBPathForeachFlag flag)
void BKE_bpath_list_restore(struct Main *bmain, eBPathForeachFlag flag, void *path_list_handle)
@ BKE_BPATH_FOREACH_PATH_SKIP_LINKED
@ BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE
void BKE_bpath_list_free(void *path_list_handle)
void BKE_bpath_foreach_path_main(BPathForeachPathData *bpath_data)
void BKE_colorband_init(struct ColorBand *coba, bool rangetype)
struct Scene * CTX_data_scene(const bContext *C)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
void CTX_data_scene_set(bContext *C, struct Scene *scene)
bool CTX_py_init_get(bContext *C)
void CTX_wm_menu_set(bContext *C, struct ARegion *menu)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_screen_set(bContext *C, struct bScreen *screen)
void CTX_data_main_set(bContext *C, struct Main *bmain)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
void CTX_wm_manager_set(bContext *C, struct wmWindowManager *wm)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
#define G_FLAG_ALL_READFILE
#define G_FILE_FLAG_ALL_RUNTIME
#define G_FLAG_ALL_RUNTIME
void do_versions_ipos_to_animato(struct Main *main)
struct ViewLayer * BKE_view_layer_default_view(const struct Scene *scene)
void BKE_lib_libblock_session_uuid_renew(struct ID *id)
void BKE_main_id_tag_all(struct Main *mainvar, int tag, bool value)
void BKE_main_id_refcount_recompute(struct Main *bmain, bool do_linked_only)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void id_sort_by_name(struct ListBase *lb, struct ID *id, struct ID *id_sorting_hint)
void BKE_lib_override_library_main_hierarchy_root_ensure(struct Main *bmain)
void BKE_lib_override_library_main_resync(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct BlendFileReadReport *reports)
void BKE_lib_override_library_main_proxy_convert(struct Main *bmain, struct BlendFileReadReport *reports)
bool BKE_lib_override_library_main_operations_create(struct Main *bmain, bool force_auto)
#define FOREACH_MAIN_LISTBASE_ID_END
int set_listbasepointers(struct Main *main, struct ListBase *lb[])
#define MAIN_VERSION_ATLEAST(main, ver, subver)
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id)
#define FOREACH_MAIN_LISTBASE_END
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb)
void BKE_main_free(struct Main *mainvar)
void BKE_preferences_asset_library_default_add(struct UserDef *userdef) ATTR_NONNULL()
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_reports_prependf(ReportList *reports, const char *prepend,...) ATTR_PRINTF_FORMAT(2
void void BKE_reports_prepend(ReportList *reports, const char *prepend)
void BKE_scene_set_background(struct Main *bmain, struct Scene *sce)
struct Scene * BKE_scene_add(struct Main *bmain, const char *name)
void BKE_screen_view3d_scene_sync(struct bScreen *screen, struct Scene *scene)
struct ScrArea struct ScrArea void BKE_screen_gizmo_tag_refresh(struct bScreen *screen)
void BKE_studiolight_default(SolidLight lights[4], float light_ambient[3])
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
size_t BLI_path_join(char *__restrict dst, size_t dst_len, const char *path_first,...) ATTR_NONNULL(1
void BLI_path_slash_native(char *path) ATTR_NONNULL()
#define STRNCPY(dst, src)
int BLI_system_memory_max_in_megabytes_int(void)
external readfile function prototypes.
const struct UserDef U_default
void BLO_update_defaults_startup_blend(struct Main *bmain, const char *app_template)
BlendFileData * BLO_read_from_memfile(struct Main *oldmain, const char *filepath, struct MemFile *memfile, const struct BlendFileReadParams *params, struct ReportList *reports)
BlendHandle * BLO_blendhandle_from_file(const char *filepath, struct BlendFileReadReport *reports)
struct BlendHandle BlendHandle
void BLO_main_expander(BLOExpandDoitCallback expand_doit_func)
BlendFileData * BLO_read_from_file(const char *filepath, eBLOReadSkip skip_flags, struct BlendFileReadReport *reports)
void BLO_expand_main(void *fdhandle, struct Main *mainvar)
void blo_lib_link_restore(struct Main *oldmain, struct Main *newmain, struct wmWindowManager *curwm, struct Scene *curscene, struct ViewLayer *cur_view_layer)
#define BLO_READ_SKIP_ALL
const struct bTheme U_theme_default
void BLO_blendhandle_close(BlendHandle *bh)
BlendFileData * BLO_read_from_memory(const void *mem, int memsize, eBLOReadSkip skip_flags, struct ReportList *reports)
void BLO_blendfiledata_free(BlendFileData *bfd)
external writefile.c function prototypes.
bool BLO_write_file(struct Main *mainvar, const char *filepath, int write_flags, const struct BlendFileWriteParams *params, struct ReportList *reports)
@ BLO_WRITE_PATH_REMAP_NONE
void BPY_context_update(struct bContext *C)
@ USER_SCRIPT_AUTOEXEC_DISABLE
#define USER_EXPERIMENTAL_TEST(userdef, member)
void IMB_colormanagement_check_file_config(struct Main *bmain)
Read Guarded memory(de)allocation.
Platform independent time functions.
int main(int argc, char *argv[])
static void setup_app_data(bContext *C, BlendFileData *bfd, const struct BlendFileReadParams *params, BlendFileReadReport *reports)
struct BlendFileData * BKE_blendfile_read_from_memory(const void *filebuf, int filelength, const struct BlendFileReadParams *params, ReportList *reports)
struct BlendFileData * BKE_blendfile_read_from_memfile(Main *bmain, struct MemFile *memfile, const struct BlendFileReadParams *params, ReportList *reports)
bool BKE_blendfile_userdef_write_all(ReportList *reports)
static bool foreach_path_clean_cb(BPathForeachPathData *UNUSED(bpath_data), char *path_dst, const char *path_src)
UserDef * BKE_blendfile_userdef_read_from_memory(const void *filebuf, int filelength, ReportList *reports)
static void handle_subversion_warning(Main *main, BlendFileReadReport *reports)
bool BKE_blendfile_userdef_write(const char *filepath, ReportList *reports)
void BKE_blendfile_read_setup(bContext *C, BlendFileData *bfd, const struct BlendFileReadParams *params, BlendFileReadReport *reports)
void BKE_blendfile_read_make_empty(bContext *C)
void BKE_blendfile_workspace_config_data_free(WorkspaceConfigFileData *workspace_config)
UserDef * BKE_blendfile_userdef_from_defaults(void)
static void clean_paths(Main *bmain)
static void blendfile_write_partial_cb(void *UNUSED(handle), Main *UNUSED(bmain), void *vid)
void BKE_blendfile_write_partial_end(Main *bmain_src)
void BKE_blendfile_read_setup_ex(bContext *C, BlendFileData *bfd, const struct BlendFileReadParams *params, BlendFileReadReport *reports, const bool startup_update_defaults, const char *startup_app_template)
UserDef * BKE_blendfile_userdef_read(const char *filepath, ReportList *reports)
bool BKE_blendfile_write_partial(Main *bmain_src, const char *filepath, const int write_flags, const int remap_mode, ReportList *reports)
static void setup_app_blend_file_data(bContext *C, BlendFileData *bfd, const struct BlendFileReadParams *params, BlendFileReadReport *reports)
void BKE_blendfile_write_partial_begin(Main *bmain_src)
static bool blendfile_or_libraries_versions_atleast(Main *bmain, const short versionfile, const short subversionfile)
static bool wm_scene_is_visible(wmWindowManager *wm, Scene *scene)
bool BKE_blendfile_userdef_write_app_template(const char *filepath, ReportList *reports)
bool BKE_blendfile_workspace_config_write(Main *bmain, const char *filepath, ReportList *reports)
struct BlendFileData * BKE_blendfile_read(const char *filepath, const struct BlendFileReadParams *params, BlendFileReadReport *reports)
bool BKE_blendfile_is_readable(const char *path, ReportList *reports)
static void setup_app_userdef(BlendFileData *bfd)
void BKE_blendfile_write_partial_tag_ID(ID *id, bool set)
WorkspaceConfigFileData * BKE_blendfile_workspace_config_read(const char *filepath, const void *filebuf, int filelength, ReportList *reports)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void RE_FreeAllPersistentData(void)
void RE_FreeAllRenderResults(void)
struct bScreen * curscreen
struct ViewLayer * cur_view_layer
struct ReportList * reports
double lib_overrides_resync
struct BlendFileReadReport::@133 duration
struct SolidLight light_param[4]
struct ColorBand coba_weight
struct ListBase workspaces
double PIL_check_seconds_timer(void)
static FT_Library library