24 # define _WIN32_IE 0x0400
44 #include BLI_SYSTEM_PID_H
202 if (wm->message_bus !=
NULL) {
204 wm->message_bus =
NULL;
284 if (screen->
winid == 0) {
290 bmain, workspace, layout_old, win);
296 win_screen->
winid = win->winid;
306 *r_new_wm_list = *current_wm_list;
346 bool has_match =
false;
372 if (oldwin->winid == win->winid) {
386 *r_new_wm_list = *readfile_wm_list;
409 *r_new_wm_list = bmain->
wm;
413 *r_new_wm_list = *readfile_wm_list;
422 C, current_wm_list, (
G.fileflags &
G_FILE_NO_UI) == 0, r_new_wm_list);
473 #define BKE_READ_EXOTIC_FAIL_PATH -3
474 #define BKE_READ_EXOTIC_FAIL_FORMAT -2
475 #define BKE_READ_EXOTIC_FAIL_OPEN -1
476 #define BKE_READ_EXOTIC_OK_BLEND 0
478 # define BKE_READ_EXOTIC_OK_OTHER 1
495 int namelen = strlen(name);
496 if (namelen > 0 &&
ELEM(name[namelen - 1],
'/',
'\\')) {
507 if (rawfile ==
NULL) {
513 if (rawfile->
read(rawfile, header,
sizeof(header)) !=
sizeof(header)) {
514 rawfile->
close(rawfile);
517 rawfile->
seek(rawfile, 0, SEEK_SET);
520 if (
STREQLEN(header,
"BLENDER", 7)) {
521 rawfile->
close(rawfile);
537 if (compressed_file !=
NULL) {
538 size_t len = compressed_file->
read(compressed_file, header,
sizeof(header));
539 compressed_file->
close(compressed_file);
540 if (
len ==
sizeof(header) &&
STREQLEN(header,
"BLENDER", 7)) {
545 rawfile->
close(rawfile);
580 if (reports ==
NULL) {
586 "Engine '%s' not available for scene '%s' (an add-on may need to be installed "
640 const bool use_data =
params->use_data;
641 const bool use_userdef =
params->use_userdef;
642 const bool is_startup_file =
params->is_startup_file;
643 const bool is_factory_startup =
params->is_factory_startup;
644 const bool reset_app_template =
params->reset_app_template;
646 bool addons_loaded =
false;
657 if (is_startup_file) {
663 bool reset_all = use_userdef;
664 if (use_userdef || reset_app_template) {
668 C, (
const char *[]){
"bl_app_template_utils",
NULL},
"bl_app_template_utils.reset()");
675 (
const char *[]){
"bpy",
"addon_utils",
NULL},
680 "bpy.utils.refresh_script_paths()\n"
682 "addon_utils.reset_all()");
687 addons_loaded =
true;
695 addons_loaded =
true;
704 if (is_factory_startup) {
713 if (is_factory_startup) {
777 double duration_whole_minutes, duration_whole_seconds;
778 double duration_libraries_minutes, duration_libraries_seconds;
779 double duration_lib_override_minutes, duration_lib_override_seconds;
780 double duration_lib_override_resync_minutes, duration_lib_override_resync_seconds;
781 double duration_lib_override_recursive_resync_minutes,
782 duration_lib_override_recursive_resync_seconds;
787 &duration_whole_minutes,
788 &duration_whole_seconds,
793 &duration_libraries_minutes,
794 &duration_libraries_seconds,
799 &duration_lib_override_minutes,
800 &duration_lib_override_seconds,
805 &duration_lib_override_resync_minutes,
806 &duration_lib_override_resync_seconds,
811 &duration_lib_override_recursive_resync_minutes,
812 &duration_lib_override_recursive_resync_seconds,
816 &
LOG, 0,
"Blender file read in %.0fm%.2fs", duration_whole_minutes, duration_whole_seconds);
819 " * Loading libraries: %.0fm%.2fs",
820 duration_libraries_minutes,
821 duration_libraries_seconds);
824 " * Applying overrides: %.0fm%.2fs",
825 duration_lib_override_minutes,
826 duration_lib_override_seconds);
829 " * Resyncing overrides: %.0fm%.2fs (%d root overrides), including recursive "
830 "resyncs: %.0fm%.2fs)",
831 duration_lib_override_resync_minutes,
832 duration_lib_override_resync_seconds,
834 duration_lib_override_recursive_resync_minutes,
835 duration_lib_override_recursive_resync_seconds);
839 node_lib = node_lib->next) {
849 "%d libraries and %d linked data-blocks are missing (including %d ObjectData and "
850 "%d Proxies), please check the Info and Outliner editors for details",
859 "%d local ObjectData and %d local Object proxies are reported to be missing, "
860 "this should never happen",
869 "%d libraries have overrides needing resync (auto resynced in %.0fm%.2fs), "
870 "please check the Info editor for details",
872 duration_lib_override_recursive_resync_minutes,
873 duration_lib_override_recursive_resync_seconds);
881 "Proxies have been removed from Blender (%d proxies were automatically converted "
882 "to library overrides, %d proxies could not be converted and were cleared). "
883 "Please also consider re-saving any library .blend file with the newest Blender version",
891 "%d sequence strips were not read because they were in a channel larger than %d",
903 const bool do_history_file_update = (
G.background ==
false) &&
905 bool success =
false;
907 const bool use_data =
true;
908 const bool use_userdef =
false;
943 const int G_f_orig =
G.f;
947 if (
G.f != G_f_orig) {
950 G.f = (
G.f & ~flags_keep) | (G_f_orig & flags_keep);
960 if (do_history_file_update) {
966 .use_data = use_data,
967 .use_userdef = use_userdef,
968 .is_startup_file =
false,
969 .is_factory_startup =
false,
970 .reset_app_template =
false,
980 else if (retval == BKE_READ_EXOTIC_OK_OTHER) {
981 BKE_undo_write(
C,
"Import file");
987 "Cannot read file '%s': %s",
989 errno ? strerror(errno) :
TIP_(
"unable to open the file"));
1002 if (success ==
false) {
1004 if (do_history_file_update) {
1058 bool success =
false;
1061 const bool use_data = params_homefile->
use_data;
1062 const bool use_userdef = params_homefile->
use_userdef;
1068 bool filepath_startup_is_factory =
true;
1074 char app_template_system[
FILE_MAX];
1077 char app_template_config[
FILE_MAX];
1081 if (use_data ==
false) {
1084 if (use_userdef ==
false) {
1090 bool is_factory_startup =
true;
1093 bool update_defaults =
false;
1095 if (filepath_startup_override !=
NULL) {
1098 else if (app_template_override) {
1102 else if (!use_factory_settings &&
U.app_template[0]) {
1106 const bool reset_app_template = ((!
app_template &&
U.app_template[0]) ||
1110 BLI_assert((use_factory_settings && filepath_startup_override) == 0);
1117 if (reset_app_template) {
1123 if (use_userdef || reset_app_template) {
1148 filepath_startup[0] =
'\0';
1149 filepath_userdef[0] =
'\0';
1150 app_template_system[0] =
'\0';
1151 app_template_config[0] =
'\0';
1154 if (!use_factory_settings) {
1158 filepath_startup_is_factory =
false;
1165 use_factory_settings =
true;
1168 if (filepath_startup_override) {
1170 filepath_startup_is_factory =
false;
1176 if (!use_factory_settings &&
BLI_exists(filepath_userdef)) {
1178 if (userdef !=
NULL) {
1183 printf(
"Read prefs: %s\n", filepath_userdef);
1190 app_template, app_template_system,
sizeof(app_template_system))) {
1199 if (!use_factory_settings) {
1202 sizeof(filepath_startup),
1203 app_template_config,
1206 filepath_startup_is_factory =
false;
1207 if (
BLI_access(filepath_startup, R_OK) != 0) {
1208 filepath_startup[0] =
'\0';
1212 filepath_startup[0] =
'\0';
1215 if (filepath_startup[0] ==
'\0') {
1217 sizeof(filepath_startup),
1218 app_template_system,
1221 filepath_startup_is_factory =
true;
1224 update_defaults =
true;
1228 if (!use_factory_settings || (filepath_startup[0] !=
'\0')) {
1229 if (
BLI_access(filepath_startup, R_OK) == 0) {
1244 is_factory_startup = filepath_startup_is_factory;
1256 if (success ==
false && filepath_startup_override && reports) {
1261 if (success ==
false) {
1278 if (use_empty_data) {
1285 if (app_template_system[0] !=
'\0') {
1287 temp_path[0] =
'\0';
1288 if (!use_factory_settings) {
1292 temp_path[0] =
'\0';
1296 if (temp_path[0] ==
'\0') {
1307 if (userdef_template ==
NULL) {
1311 if (userdef_template) {
1313 userdef_template =
NULL;
1318 if (app_template_override) {
1319 BLI_strncpy(
U.app_template, app_template_override,
sizeof(
U.app_template));
1338 if (wm->defaultconf) {
1354 .is_startup_file =
true,
1358 if (r_params_file_read_post ==
NULL) {
1363 **r_params_file_read_post = params_file_read_post;
1382 MEM_freeN((
void *)params_file_read_post);
1411 for (
l = lines, num = 0;
l && (num <
U.recent_files);
l =
l->
next) {
1457 const char *user_config_dir;
1463 if (!user_config_dir) {
1472 fprintf(fp,
"%s\n", recent->filepath);
1487 if (blendfile_path[0] ==
'\0') {
1491 recent =
G.recent_files.first;
1501 for (recent =
BLI_findlink(&
G.recent_files,
U.recent_files - 1); recent;
1502 recent = recent_next) {
1503 recent_next = recent->
next;
1551 if (
G.background || (win ==
NULL)) {
1556 while (win && win->
parent) {
1566 if (ibuf->
x > ibuf->
y) {
1612 const float pixelsize_old =
U.pixelsize;
1614 char err_out[256] =
"unknown";
1621 if (screen !=
NULL) {
1624 v3d =
area->spacedata.first;
1671 U.pixelsize = pixelsize_old;
1674 if (windrawable_old) {
1694 CLOG_WARN(&
LOG,
"failed to create thumbnail: %s", err_out);
1717 printf(
"written: %s\n", path);
1720 printf(
"failed: %s\n", path);
1731 bool use_save_as_copy,
1794 if (thumb !=
NULL) {
1799 int file_preview_type =
U.file_preview_type;
1809 switch (file_preview_type) {
1840 .remap_mode = remap_mode,
1841 .use_save_versions =
true,
1842 .use_save_as_copy = use_save_as_copy,
1846 const bool do_history_file_update = (
G.background ==
false) &&
1849 if (use_save_as_copy ==
false) {
1856 if (do_history_file_update) {
1878 if (thumb && thumb != main_thumb) {
1895 const int pid =
abs(getpid());
1898 const char *savedir;
1906 if (blendfile_path && (blendfile_path[0] !=
'\0')) {
1912 BLI_snprintf(path,
sizeof(path),
"%d_autosave.blend", pid);
1943 if (memfile !=
NULL) {
1949 CLOG_WARN(&
LOG,
"undo-data not found for writing, fallback to regular file write!");
2087 if (cfgdir ==
NULL) {
2105 printf(
"Writing homefile: '%s' ",
filepath);
2121 .use_save_as_copy =
true,
2138 ot->
name =
"Save Startup File";
2139 ot->
idname =
"WM_OT_save_homefile";
2140 ot->
description =
"Make the current file the default .blend file";
2167 ot->
name =
"Save Preferences";
2168 ot->
idname =
"WM_OT_save_userpref";
2186 #define USERDEF_RESTORE(member) \
2188 userdef_curr->member = userdef_prev->member; \
2195 #undef USERDEF_RESTORE
2252 const bool use_data =
false;
2253 const bool use_userdef =
true;
2254 const bool use_factory_settings =
STREQ(op->
type->
idname,
"WM_OT_read_factory_userpref");
2260 .use_data = use_data,
2261 .use_userdef = use_userdef,
2262 .use_factory_settings = use_factory_settings,
2263 .use_empty_data =
false,
2264 .filepath_startup_override =
NULL,
2276 if (use_factory_settings) {
2277 U.runtime.is_dirty =
true;
2295 ot->
name =
"Load Preferences";
2296 ot->
idname =
"WM_OT_read_userpref";
2305 ot->
name =
"Load Factory Preferences";
2306 ot->
idname =
"WM_OT_read_factory_userpref";
2308 "Load factory default preferences. "
2309 "To make changes to preferences permanent, use \"Save Preferences\"";
2330 ot->
name =
"Reload History File";
2352 "WM_OT_read_factory_settings");
2353 const bool use_factory_settings = use_factory_startup_and_userdef ||
2355 bool use_userdef =
false;
2360 if (!use_factory_settings) {
2379 if (use_factory_startup_and_userdef) {
2387 char app_template_buf[
sizeof(
U.app_template)];
2390 const bool use_splash = !use_factory_settings &&
RNA_boolean_get(op->
ptr,
"use_splash");
2397 if (!use_factory_settings) {
2414 .use_userdef = use_userdef,
2415 .use_factory_settings = use_factory_settings,
2416 .use_empty_data = use_empty_data,
2417 .filepath_startup_override =
filepath,
2430 if (use_factory_settings) {
2431 U.runtime.is_dirty =
true;
2470 ot->
name =
"Reload Start-Up File";
2471 ot->
idname =
"WM_OT_read_homefile";
2472 ot->
description =
"Open the default file (doesn't save the current file)";
2478 ot->
srna,
"filepath",
NULL,
FILE_MAX,
"File Path",
"Path to an alternative start-up file");
2483 ot->
srna,
"load_ui",
true,
"Load UI",
"Load user interface setup from the .blend file");
2503 ot->
name =
"Load Factory Settings";
2504 ot->
idname =
"WM_OT_read_factory_settings";
2506 "Load factory default startup file and preferences. "
2507 "To make changes permanent, use \"Save Startup File\" and \"Save Preferences\"";
2571 for (
int i = 0; targets[i].
run; i++) {
2574 return target.
run(
C, op);
2632 if (
G.recent_files.first) {
2710 if (
BLI_stat(path, &stats) == -1) {
2717 bool is_today, is_yesterday;
2719 NULL, (
int64_t)stats.st_mtime,
false, time_st, date_st, &is_today, &is_yesterday);
2720 if (is_today || is_yesterday) {
2729 "%s\n\n%s: %s %s\n%s: %s", path,
TIP_(
"Modified"), date_st, time_st,
TIP_(
"Size"), size_str);
2737 "Struct must not exceed pointer size");
2752 *(lslash + 1) =
'\0';
2773 const char *autoexec_text;
2779 autoexec_text =
IFACE_(
"Trusted Source [Untrusted Path]");
2784 autoexec_text =
IFACE_(
"Trusted Source");
2787 uiItemR(
col, op->
ptr,
"use_scripts", 0, autoexec_text, ICON_NONE);
2796 "Allow .blend file to execute scripts automatically, default available from "
2797 "system preferences");
2803 ot->
idname =
"WM_OT_open_mainfile";
2822 ot->
srna,
"load_ui",
true,
"Load UI",
"Load user interface setup in the .blend file");
2827 ot->
srna,
"display_file_selector",
true,
"Display File Selector",
"");
2861 return (blendfile_path[0] !=
'\0');
2867 ot->
idname =
"WM_OT_revert_mainfile";
2898 if (!
G.background) {
2933 ot->
name =
"Recover Last Session";
2934 ot->
idname =
"WM_OT_recover_last_session";
2966 if (!
G.background) {
2992 ot->
name =
"Recover Auto Save";
2993 ot->
idname =
"WM_OT_recover_auto_save";
2994 ot->
description =
"Open an automatically saved file to recover it";
3032 if (blendfile_path[0] !=
'\0') {
3051 if ((blendfile_path[0] ==
'\0') &&
G.recent_files.first) {
3097 if (is_filepath_set) {
3104 if (path[0] ==
'\0') {
3107 "Unable to save an unsaved file with an empty or unset \"filepath\" property");
3119 "The \"filepath\" property was not an absolute path: \"%s\"",
3124 const int fileflags_orig =
G.fileflags;
3125 int fileflags =
G.fileflags;
3136 G.fileflags = fileflags_orig;
3187 "Save the current file in the desired location but do not make the saved file active"));
3197 ot->
idname =
"WM_OT_save_as_mainfile";
3198 ot->
description =
"Save the current file in the desired location";
3219 "Remap relative paths when saving to a different directory");
3225 "Save a copy of the actual working state but does not make saved file active");
3252 if (blendfile_path[0] !=
'\0') {
3274 ot->
name =
"Save Blender File";
3275 ot->
idname =
"WM_OT_save_mainfile";
3296 "Remap relative paths when saving to a different directory");
3374 TIP_(
"For security reasons, automatic execution of Python scripts "
3375 "in this file was disabled:"),
3380 uiItemL(
col,
TIP_(
"This may lead to unexpected behavior"), ICON_NONE);
3388 "use_scripts_auto_execute",
3390 TIP_(
"Permanently allow execution of scripts"),
3408 if ((blendfile_path[0] !=
'\0') && wm->
file_saved) {
3413 IFACE_(
"Allow Execution"),
3423 TIP_(
"Reload file with execution of Python scripts enabled"));
3431 IFACE_(
"Allow Execution"),
3441 TIP_(
"Enable scripts"));
3461 TIP_(
"Continue using file without Python scripts"));
3571 char writer_ver_str[16];
3572 char current_ver_str[16];
3581 writer_ver_str,
sizeof(writer_ver_str), bmain->
versionfile, -1);
3586 char message_line1[256];
3587 char message_line2[256];
3589 TIP_(
"This file was saved by a newer version of Blender (%s)"),
3592 TIP_(
"Saving it with this Blender (%s) may cause loss of data"),
3594 uiItemL(layout, message_line1, ICON_NONE);
3595 uiItemL(layout, message_line2, ICON_NONE);
3607 block,
UI_BTYPE_BUT, 0, 0,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
NULL, 0, 0, 0, 0,
"");
3625 PointerRNA *operator_propptr_p = &operator_propptr;
3638 block,
UI_BTYPE_BUT, 0, 0,
IFACE_(
"Overwrite"), 0, 0, 0,
UI_UNIT_Y,
NULL, 0, 0, 0, 0,
"");
3655 block,
UI_BTYPE_BUT, 0, 0,
IFACE_(
"Save As..."), 0, 0, 0,
UI_UNIT_Y,
NULL, 0, 0, 0, 0,
"");
3677 layout,
TIP_(
"Overwrite file with an older Blender version?"), ICON_NONE,
true,
false);
3682 if (blendfile_path[0] !=
'\0') {
3691 uiItemL(layout, filename, ICON_NONE);
3766 bool execute_callback =
true;
3779 execute_callback =
false;
3785 if (file_has_been_saved_before) {
3794 execute_callback =
false;
3799 execute_callback =
false;
3805 execute_callback =
false;
3808 if (execute_callback) {
3817 block,
UI_BTYPE_BUT, 0, 0,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y, 0, 0, 0, 0, 0,
"");
3825 block,
UI_BTYPE_BUT, 0, 0,
IFACE_(
"Don't Save"), 0, 0, 0,
UI_UNIT_Y, 0, 0, 0, 0, 0,
"");
3832 const bool has_forwardcompat_issues)
3840 has_forwardcompat_issues ?
IFACE_(
"Save As...") :
IFACE_(
"Save"),
3862 char *save_catalogs_when_file_is_closed = arg1;
3883 uiItemL_ex(layout,
TIP_(
"Save changes before closing?"), ICON_NONE,
true,
false);
3888 if (blendfile_path[0] !=
'\0') {
3892 STRNCPY(filename,
"untitled.blend");
3894 uiItemL(layout, filename, ICON_NONE);
3897 if (has_forwardcompat_issues) {
3914 char *message =
BLI_strdupn(report->message, report->len);
3915 char *path_info = strstr(message,
": ");
3918 path_info[1] =
'\0';
3922 uiItemL_ex(row, message, ICON_NONE,
false,
true);
3924 uiItemL_ex(row, path_info, ICON_NONE,
false,
true);
3930 bool has_extra_checkboxes =
false;
3933 if (modified_images_count > 0) {
3935 BLI_snprintf(message,
sizeof(message),
"Save %u modified image(s)", modified_images_count);
3937 if (!has_extra_checkboxes) {
3955 has_extra_checkboxes =
true;
3959 static char save_catalogs_when_file_is_closed;
3964 if (!has_extra_checkboxes) {
3971 "Save modified asset catalogs",
3976 &save_catalogs_when_file_is_closed,
3984 has_extra_checkboxes =
true;
3989 uiItemS_ex(layout, has_extra_checkboxes ? 2.0f : 4.0f);
3993 const bool windows_layout =
true;
3995 const bool windows_layout =
false;
3998 if (windows_layout) {
bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module)
bool BKE_appdir_app_template_any(void)
void BKE_tempdir_init(const char *userdir)
const char * BKE_appdir_folder_id_create(int folder_id, const char *subfolder)
#define BLENDER_USERPREF_FILE
const char * BKE_appdir_folder_id(int folder_id, const char *subfolder)
bool BKE_appdir_app_template_has_userpref(const char *app_template)
#define BLENDER_HISTORY_FILE
#define BLENDER_STARTUP_FILE
bool BKE_appdir_app_template_id_search(const char *app_template, char *path, size_t path_len)
#define BLENDER_QUIT_FILE
const char * BKE_tempdir_base(void)
bool BKE_asset_library_has_any_unsaved_catalogs(void)
bool BKE_autoexec_match(const char *path)
void BKE_blender_userdef_data_set_and_free(struct UserDef *userdef)
void BKE_blender_userdef_app_template_data_set_and_free(struct UserDef *userdef)
void BKE_blender_version_blendfile_string_from_values(char *str_buff, const size_t str_buff_len, const short file_version, const short file_subversion)
#define BLENDER_FILE_SUBVERSION
#define BLENDER_FILE_VERSION
struct UserDef * BKE_blendfile_userdef_read(const char *filepath, struct ReportList *reports)
struct BlendFileData * BKE_blendfile_read(const char *filepath, const struct BlendFileReadParams *params, struct BlendFileReadReport *reports)
struct BlendFileData * BKE_blendfile_read_from_memory(const void *filebuf, int filelength, const struct BlendFileReadParams *params, struct ReportList *reports)
struct UserDef * BKE_blendfile_userdef_from_defaults(void)
void BKE_blendfile_read_setup_ex(struct bContext *C, struct BlendFileData *bfd, const struct BlendFileReadParams *params, struct BlendFileReadReport *reports, bool startup_update_defaults, const char *startup_app_template)
void BKE_blendfile_read_setup(struct bContext *C, struct BlendFileData *bfd, const struct BlendFileReadParams *params, struct BlendFileReadReport *reports)
void BKE_blendfile_read_make_empty(struct bContext *C)
bool BKE_blendfile_userdef_write_all(struct ReportList *reports)
void BKE_callback_exec_null(struct Main *bmain, eCbEvent evt)
@ BKE_CB_EVT_LOAD_FACTORY_STARTUP_POST
@ BKE_CB_EVT_LOAD_FACTORY_USERDEF_POST
@ BKE_CB_EVT_VERSION_UPDATE
struct Scene * CTX_data_scene(const bContext *C)
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 Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_window_set(bContext *C, struct wmWindow *win)
struct ReportList * CTX_wm_reports(const bContext *C)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
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
@ G_FLAG_SCRIPT_OVERRIDE_PREF
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET
@ G_FLAG_USERPREF_NO_SAVE_ON_EXIT
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL
#define G_FLAG_ALL_RUNTIME
void IDP_FreeProperty(struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BKE_lib_override_library_main_operations_create(struct Main *bmain, bool force_auto)
@ ID_REMAP_SKIP_USER_CLEAR
@ ID_REMAP_SKIP_INDIRECT_USAGE
void void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags) ATTR_NONNULL(1
struct ImBuf * BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
struct BlendThumbnail * BKE_main_thumbnail_from_imbuf(struct Main *bmain, struct ImBuf *img)
const char * BKE_main_blendfile_path_from_global(void)
bool BKE_main_namemap_validate(struct Main *bmain) ATTR_NONNULL()
bool BKE_main_namemap_get_name(struct Main *bmain, struct ID *id, char *name) ATTR_NONNULL()
void BKE_packedfile_pack_all(struct Main *bmain, struct ReportList *reports, bool verbose)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report_print_level_set(ReportList *reports, eReportType level)
void BKE_reports_clear(ReportList *reports)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_reports_init(ReportList *reports, int flag)
void BKE_scene_free_depsgraph_hash(struct Scene *scene)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion struct ARegion struct ScrArea struct ScrArea * BKE_screen_find_big_area(struct bScreen *screen, int spacetype, short min)
void BKE_sound_init(struct Main *main)
UndoStack * BKE_undosys_stack_create(void)
void BKE_undosys_stack_init_from_context(UndoStack *ustack, struct bContext *C)
void BKE_undosys_stack_clear(UndoStack *ustack)
void BKE_undosys_stack_init_from_main(UndoStack *ustack, struct Main *bmain)
void BKE_workspace_active_set(struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace) SETTER_ATTRS
struct WorkSpaceLayout * BKE_workspace_layout_find_global(const struct Main *bmain, const struct bScreen *screen, struct WorkSpace **r_workspace) ATTR_NONNULL(1
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_is_writable(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_magic_is_gzip(const char header[4])
int BLI_stat(const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_delete(const char *file, bool dir, bool recursive) ATTR_NONNULL()
void BLI_filelist_entry_size_to_string(const struct stat *st, uint64_t st_size_fallback, bool compact, char r_size[FILELIST_DIRENTRY_SIZE_LEN])
int BLI_rename(const char *from, const char *to) ATTR_NONNULL()
void BLI_file_free_lines(struct LinkNode *lines)
bool BLI_file_magic_is_zstd(const char header[4])
struct LinkNode * BLI_file_read_as_lines(const char *file) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_access(const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_filelist_entry_datetime_to_string(const struct stat *st, int64_t ts, bool compact, char r_time[FILELIST_DIRENTRY_TIME_LEN], char r_date[FILELIST_DIRENTRY_DATE_LEN], bool *r_is_today, bool *r_is_yesterday)
int BLI_open(const char *filepath, int oflag, int pmode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Some types for dealing with directories.
#define FILELIST_DIRENTRY_SIZE_LEN
#define FILELIST_DIRENTRY_DATE_LEN
#define FILELIST_DIRENTRY_TIME_LEN
Wrapper for reading from various sources (e.g. raw files, compressed files, memory....
FileReader * BLI_filereader_new_file(int filedes) ATTR_WARN_UNUSED_RESULT
FileReader * BLI_filereader_new_zstd(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
FileReader * BLI_filereader_new_gzip(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findstring_ptr(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
void BLI_math_time_seconds_decompose(double seconds, double *r_days, double *r_hours, double *r_minutes, double *r_seconds, double *r_milliseconds)
void BLI_split_dir_part(const char *string, char *dir, size_t dirlen)
const char * BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_filename_ensure(char *filepath, size_t maxlen, const char *filename) ATTR_NONNULL()
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_is_abs_from_cwd(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file)
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
size_t BLI_path_join(char *__restrict dst, size_t dst_len, const char *path_first,...) ATTR_NONNULL(1
const char * BLI_path_slash_rfind(const char *string) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void BLI_split_file_part(const char *string, char *file, size_t filelen)
void BLI_join_dirfile(char *__restrict dst, size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
int BLI_thread_is_main(void)
void BLI_timer_on_file_load(void)
#define STREQLEN(a, b, n)
#define SET_FLAG_FROM_TEST(value, test, flag)
Compatibility-like things for windows.
external readfile function prototypes.
void BLO_sanitize_experimental_features_userpref_blend(struct UserDef *userdef)
bool BLO_has_bfile_extension(const char *str)
bool BLO_memfile_write_file(struct MemFile *memfile, const char *filepath)
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
@ BLO_WRITE_PATH_REMAP_ABSOLUTE
@ BLO_WRITE_PATH_REMAP_RELATIVE
#define CTX_IFACE_(context, msgid)
void BPY_python_reset(struct bContext *C)
bool BPY_run_string_eval(struct bContext *C, const char *imports[], const char *expr)
bool BPY_run_string_exec(struct bContext *C, const char *imports[], const char *expr)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
struct Depsgraph Depsgraph
Object is a sort of wrapper for general info.
@ USER_SCRIPT_AUTOEXEC_DISABLE
@ USER_FILE_PREVIEW_CAMERA
@ USER_FILE_PREVIEW_SCREENSHOT
@ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS
bool ED_asset_catalogs_get_save_catalogs_when_file_is_saved(void)
void ED_asset_catalogs_set_save_catalogs_when_file_is_saved(bool should_save)
void ED_assets_pre_save(struct Main *bmain)
int datatoc_startup_blend_size
const char datatoc_startup_blend[]
void ED_file_read_bookmarks(void)
bool ED_image_should_save_modified(const struct Main *bmain)
bool ED_image_save_all_modified(const struct bContext *C, struct ReportList *reports)
int ED_image_save_all_modified_info(const struct Main *bmain, struct ReportList *reports)
void ED_outliner_select_sync_from_all_tag(struct bContext *C)
void ED_preview_restart_queue_free(void)
void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen)
struct WorkSpaceLayout * ED_workspace_layout_duplicate(struct Main *bmain, struct WorkSpace *workspace, const struct WorkSpaceLayout *layout_old, struct wmWindow *win) ATTR_NONNULL()
struct MemFile * ED_undosys_stack_memfile_get_active(struct UndoStack *ustack)
void ED_editors_exit(struct Main *bmain, bool do_undo_system)
void ED_editors_init(struct bContext *C)
bool ED_editors_flush_edits(struct Main *bmain)
void ED_view3d_local_collections_reset(struct bContext *C, bool reset_all)
struct ImBuf * ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph, struct Scene *scene, eDrawType drawtype, struct View3D *v3d, struct ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, bool restore_rv3d_mats, struct GPUOffScreen *ofs, char err_out[256])
struct ImBuf * ED_view3d_draw_offscreen_imbuf_simple(struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, struct Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, struct GPUOffScreen *ofs, char err_out[256])
GHOST C-API function and type declarations.
void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata)
void GHOST_addToSystemRecentFiles(const char *filename)
bool IMB_scaleImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
struct ImBuf * IMB_allocFromBufferOwn(unsigned int *rect, float *rectf, unsigned int w, unsigned int h, unsigned int channels)
Contains defines and structs used throughout the imbuf module.
#define PREVIEW_RENDER_LARGE_HEIGHT
void IMB_thumb_delete(const char *filepath, ThumbSize size)
struct ImBuf * IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, struct ImBuf *img)
void MEM_CacheLimiter_set_maximum(size_t m)
Read Guarded memory(de)allocation.
Platform independent time functions.
void uiItemS_ex(uiLayout *layout, float factor)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void uiLayoutSetActive(uiLayout *layout, bool active)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void uiItemL(uiLayout *layout, const char *name, int icon)
uiLayout * uiItemsAlertBox(uiBlock *block, int size, eAlertIcon icon)
@ UI_BLOCK_THEME_STYLE_POPUP
void uiItemS(uiLayout *layout)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
void UI_but_drawflag_disable(uiBut *but, int flag)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void UI_block_bounds_set_centered(uiBlock *block, int addval)
uiBut * uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
void UI_block_flag_enable(uiBlock *block, int flag)
void uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert)
void UI_popup_block_invoke(struct bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
bool UI_popup_block_name_exists(const struct bScreen *screen, const char *name)
void UI_init_userdef(void)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_icons_reload_internal_textures(void)
void UI_view2d_zoom_cache_reset(void)
void(* wmGenericCallbackFn)(struct bContext *C, void *user_data)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
static char * basename(char *string)
const Depsgraph * depsgraph
DEGForeachIDComponentCallback callback
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, CollectionPropertyIterator *iter)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_property_collection_end(CollectionPropertyIterator *iter)
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
bool RNA_property_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, eRNACompareMode mode)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
unsigned __int64 uint64_t
double lib_overrides_recursive_resync
struct ReportList * reports
int resynced_lib_overrides
struct LinkNode * resynced_lib_overrides_libraries
int resynced_lib_overrides_libraries_count
int sequence_strips_skipped
int proxies_to_lib_overrides_failures
struct BlendFileReadReport::@134 count
double lib_overrides_resync
struct BlendFileReadReport::@133 duration
int proxies_to_lib_overrides_success
bool has_forward_compatibility_issues
BlendThumbnail * blen_thumb
struct MainIDRelations * relations
int(* run)(bContext *C, wmOperator *op)
const char * app_template_override
const char * filepath_startup_override
unsigned int use_factory_settings
unsigned int use_empty_data
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
char *(* get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *)
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
const char * translation_context
void(* ui)(struct bContext *, struct wmOperator *)
bool(* check)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
const char *(* get_name)(struct wmOperatorType *, struct PointerRNA *)
struct ReportList * reports
struct wmOperatorType * type
struct wmKeyConfig * defaultconf
struct UndoStack * undo_stack
struct wmWindow * winactive
struct wmKeyConfig * userconf
struct wmTimer * autosavetimer
struct wmWindow * windrawable
struct wmKeyConfig * addonconf
struct wmEvent * eventstate
struct wmEvent * event_last_handled
double PIL_check_seconds_timer(void)
static FT_Library library
void wm_clear_default_size(bContext *C)
void wm_close_and_free_all(bContext *C, ListBase *wmlist)
void WM_check(bContext *C)
void WM_keyconfig_reload(bContext *C)
void wm_add_default(Main *bmain, bContext *C)
void WM_cursor_wait(bool val)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
void WM_report_banner_show(void)
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
int WM_operator_name_call_with_properties(bContext *C, const char *opstring, wmOperatorCallContext context, IDProperty *properties, const wmEvent *event)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
static void wm_history_file_update(void)
static void free_post_file_close_action(void *arg)
static uiBlock * block_create__close_file_dialog(struct bContext *C, struct ARegion *region, void *arg1)
static const char * wm_save_as_mainfile_get_name(wmOperatorType *ot, PointerRNA *ptr)
static void save_file_forwardcompat_saveas(bContext *C, void *arg_block, void *UNUSED(arg_data))
static void wm_autosave_location(char *filepath)
void WM_file_autosave_init(wmWindowManager *wm)
void wm_autosave_timer_end(wmWindowManager *wm)
static void create_operator_state(wmOperatorType *ot, int first_state)
#define BKE_READ_EXOTIC_OK_BLEND
static void wm_window_match_do(bContext *C, ListBase *current_wm_list, ListBase *readfile_wm_list, ListBase *r_new_wm_list)
static void wm_block_autorun_warning_enable_scripts(bContext *C, void *arg_block, void *UNUSED(arg))
bool wm_operator_close_file_dialog_if_needed(bContext *C, wmOperator *op, wmGenericCallbackFn post_action_fn)
static void wm_open_mainfile_ui(bContext *UNUSED(C), wmOperator *op)
static void wm_init_userdef(Main *bmain)
static struct @1192 wm_test_autorun_revert_action_data
bool write_crash_blend(void)
static void save_file_forwardcompat_overwrite(bContext *C, void *arg_block, void *arg_data)
static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
static void wm_history_files_free(void)
static bool wm_open_mainfile_check(bContext *UNUSED(C), wmOperator *op)
static void wm_block_autorun_warning_ignore(bContext *C, void *arg_block, void *UNUSED(arg))
static int operator_state_dispatch(bContext *C, wmOperator *op, OperatorDispatchTarget *targets)
static bool blend_save_check(bContext *UNUSED(C), wmOperator *op)
bool WM_file_recover_last_session(bContext *C, ReportList *reports)
void WM_OT_read_history(wmOperatorType *ot)
static void file_forwardcompat_detailed_info_show(uiLayout *parent_layout, Main *bmain)
static void wm_open_mainfile_after_dialog_callback(bContext *C, void *user_data)
void wm_open_init_use_scripts(wmOperator *op, bool use_prefs)
static int wm_homefile_read_exec(bContext *C, wmOperator *op)
static int wm_open_mainfile__discard_changes(bContext *C, wmOperator *op)
static void save_file_forwardcompat_overwrite_button(uiBlock *block, wmGenericCallback *post_action)
static bool wm_revert_mainfile_poll(bContext *UNUSED(C))
#define BKE_READ_EXOTIC_FAIL_FORMAT
void wm_test_autorun_revert_action_set(wmOperatorType *ot, PointerRNA *ptr)
void wm_homefile_read_ex(bContext *C, const struct wmHomeFileRead_Params *params_homefile, ReportList *reports, struct wmFileReadPost_Params **r_params_file_read_post)
#define BKE_READ_EXOTIC_FAIL_OPEN
bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm)
void WM_OT_save_as_mainfile(wmOperatorType *ot)
void wm_autosave_delete(void)
void WM_OT_open_mainfile(wmOperatorType *ot)
const char * WM_init_state_app_template_get(void)
static void wm_block_file_close_cancel_button(uiBlock *block, wmGenericCallback *post_action)
void wm_homefile_read_post(struct bContext *C, const struct wmFileReadPost_Params *params_file_read_post)
static RecentFile * wm_file_history_find(const char *filepath)
void wm_autosave_timer_begin(wmWindowManager *wm)
static void save_catalogs_when_file_is_closed_set_fn(bContext *UNUSED(C), void *arg1, void *UNUSED(arg2))
static void rna_struct_update_when_changed(bContext *C, Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b)
void WM_OT_recover_last_session(wmOperatorType *ot)
void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *UNUSED(wt))
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int wm_revert_mainfile_exec(bContext *C, wmOperator *op)
static void wm_autosave_write(Main *bmain, wmWindowManager *wm)
static bool wm_file_read_opwrap(bContext *C, const char *filepath, ReportList *reports)
BLI_STATIC_ASSERT(sizeof(struct FileRuntime)<=sizeof(void *), "Struct must not exceed pointer size")
void wm_save_file_forwardcompat_dialog(bContext *C, wmOperator *op)
static void save_file_forwardcompat_cancel_button(uiBlock *block, wmGenericCallback *post_action)
static void wm_homefile_read_after_dialog_callback(bContext *C, void *user_data)
static OperatorDispatchTarget wm_open_mainfile_dispatch_targets[]
#define USERDEF_RESTORE(member)
static void wm_userpref_read_exceptions(UserDef *userdef_curr, const UserDef *userdef_prev)
static char * wm_open_mainfile_description(struct bContext *UNUSED(C), struct wmOperatorType *UNUSED(op), struct PointerRNA *params)
static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void WM_OT_read_userpref(wmOperatorType *ot)
static void wm_test_autorun_revert_action_exec(bContext *C)
static void wm_recover_last_session_after_dialog_callback(bContext *C, void *user_data)
static char save_images_when_file_is_closed
static void wm_block_file_close_cancel(bContext *C, void *arg_block, void *UNUSED(arg_data))
void wm_file_read_report(bContext *C, Main *bmain)
struct OperatorDispatchTarget OperatorDispatchTarget
static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void WM_OT_save_homefile(wmOperatorType *ot)
void WM_OT_read_factory_userpref(wmOperatorType *ot)
static int wm_userpref_write_exec(bContext *C, wmOperator *op)
static int get_operator_state(wmOperator *op)
void WM_init_state_app_template_set(const char *app_template)
static void save_set_compress(wmOperator *op)
bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
static void wm_window_match_init(bContext *C, ListBase *wmlist)
static void save_file_forwardcompat_saveas_button(uiBlock *block, wmGenericCallback *post_action)
static const char * save_file_forwardcompat_dialog_name
static int wm_read_exotic(const char *name)
static char * wm_save_as_mainfile_get_description(bContext *UNUSED(C), wmOperatorType *UNUSED(ot), PointerRNA *ptr)
void WM_OT_save_mainfile(wmOperatorType *ot)
void WM_OT_recover_auto_save(wmOperatorType *ot)
void wm_homefile_read(bContext *C, const struct wmHomeFileRead_Params *params_homefile, ReportList *reports)
void wm_history_file_read(void)
static void wm_window_substitute_old(wmWindowManager *oldwm, wmWindowManager *wm, wmWindow *oldwin, wmWindow *win)
static int wm_recover_last_session_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void wm_window_match_keep_current_wm(const bContext *C, ListBase *current_wm_list, const bool load_ui, ListBase *r_new_wm_list)
static uiBlock * block_create_autorun_warning(struct bContext *C, struct ARegion *region, void *UNUSED(arg1))
static void wm_block_file_close_discard(bContext *C, void *arg_block, void *arg_data)
static RecentFile * wm_history_file_new(const char *filepath)
@ OPEN_MAINFILE_STATE_OPEN
@ OPEN_MAINFILE_STATE_DISCARD_CHANGES
@ OPEN_MAINFILE_STATE_SELECT_FILE_PATH
static void set_next_operator_state(wmOperator *op, int state)
void WM_file_tag_modified(void)
void WM_file_autoexec_init(const char *filepath)
static int wm_open_mainfile_dispatch(bContext *C, wmOperator *op)
static void wm_window_match_replace_by_file_wm(bContext *C, ListBase *current_wm_list, ListBase *readfile_wm_list, ListBase *r_new_wm_list)
static int wm_homefile_read_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void wm_userpref_update_when_changed(bContext *C, Main *bmain, UserDef *userdef_prev, UserDef *userdef_curr)
static const char * close_file_dialog_name
static void save_file_forwardcompat_cancel(bContext *C, void *arg_block, void *UNUSED(arg_data))
static void wm_filepath_default(const Main *bmain, char *filepath)
void WM_OT_read_factory_settings(wmOperatorType *ot)
static int wm_userpref_read_exec(bContext *C, wmOperator *op)
static int wm_open_mainfile__open(bContext *C, wmOperator *op)
static int wm_history_file_read_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
void wm_test_autorun_warning(bContext *C)
static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void wm_file_read_pre(bContext *C, bool use_data, bool UNUSED(use_userdef))
static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *params)
static uiBlock * block_create_save_file_forwardcompat_dialog(bContext *C, ARegion *region, void *arg1)
void wm_open_init_load_ui(wmOperator *op, bool use_prefs)
static void wm_history_file_free(RecentFile *recent)
static void wm_autosave_timer_begin_ex(wmWindowManager *wm, double timestep)
static void wm_open_mainfile_def_property_use_scripts(wmOperatorType *ot)
#define BKE_READ_EXOTIC_FAIL_PATH
static bool wm_file_write(bContext *C, const char *filepath, int fileflags, eBLO_WritePathRemap remap_mode, bool use_save_as_copy, ReportList *reports)
static void file_read_reports_finalize(BlendFileReadReport *bf_reports)
static void wm_free_operator_properties_callback(void *user_data)
static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_data)
static void save_set_filepath(bContext *C, wmOperator *op)
static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
void WM_OT_read_homefile(wmOperatorType *ot)
static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
static void wm_block_file_close_save_button(uiBlock *block, wmGenericCallback *post_action, const bool has_forwardcompat_issues)
static void wm_block_file_close_discard_button(uiBlock *block, wmGenericCallback *post_action)
static ImBuf * blend_file_thumb_from_screenshot(bContext *C, BlendThumbnail **r_thumb)
static int wm_homefile_write_exec(bContext *C, wmOperator *op)
static ImBuf * blend_file_thumb_from_camera(const bContext *C, Scene *scene, bScreen *screen, BlendThumbnail **r_thumb)
void WM_OT_save_userpref(wmOperatorType *ot)
static struct @1190 wm_init_state_app_template
static void wm_block_autorun_warning_reload_with_scripts(bContext *C, void *arg_block, void *UNUSED(arg))
static void wm_history_file_write(void)
static void read_homefile_props(wmOperatorType *ot)
static int wm_open_mainfile__select_file_path(bContext *C, wmOperator *op)
void WM_OT_revert_mainfile(wmOperatorType *ot)
void wm_close_file_dialog(bContext *C, wmGenericCallback *post_action)
void WM_reinit_gizmomap_all(Main *bmain)
void WM_init_splash(bContext *C)
void wm_exit_schedule_delayed(const bContext *C)
void WM_jobs_kill_all(wmWindowManager *wm)
void WM_keyconfig_update(wmWindowManager *wm)
void WM_msgbus_destroy(struct wmMsgBus *mbus)
@ WM_MSG_STATICTYPE_FILE_READ
void WM_msg_publish_static(struct wmMsgBus *mbus, int event)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
void WM_operatortype_last_properties_clear_all(void)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
int WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)
wmGenericCallback * WM_generic_callback_steal(wmGenericCallback *callback)
void WM_generic_callback_free(wmGenericCallback *callback)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
WorkSpaceLayout * WM_window_get_active_layout(const wmWindow *win)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
uint * WM_window_pixels_read(wmWindowManager *wm, wmWindow *win, int r_size[2])
void WM_window_set_active_screen(wmWindow *win, WorkSpace *workspace, bScreen *screen)
void wm_window_ghostwindows_remove_invalid(bContext *C, wmWindowManager *wm)
void wm_window_clear_drawable(wmWindowManager *wm)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
bool WM_window_is_temp_screen(const wmWindow *win)
void WM_window_set_active_layout(wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout)
void WM_init_input_devices(void)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)