23# define _WIN32_IE 0x0400
31#include <fmt/format.h>
50#include BLI_SYSTEM_PID_H
171#define USE_THUMBNAIL_FAST_DOWNSCALE
213 const bool is_read_homefile)
224 return wm_setup_data;
247 if (
wm->runtime->message_bus !=
nullptr) {
249 wm->runtime->message_bus =
nullptr;
271 return wm_setup_data;
283 wm->runtime->winactive = win;
285 if (oldwm->
runtime->windrawable == oldwin) {
286 oldwm->
runtime->windrawable =
nullptr;
287 wm->runtime->windrawable = win;
328 wm_setup_data->
old_wm =
nullptr;
341 if (screen !=
nullptr) {
350 if (screen->
winid == 0) {
360 bmain, workspace, layout_ref, win);
366 win_screen->
winid = win->winid;
381 wm->runtime->keyconfigs = old_wm->
runtime->keyconfigs;
382 wm->runtime->addonconf = old_wm->
runtime->addonconf;
383 wm->runtime->defaultconf = old_wm->
runtime->defaultconf;
384 wm->runtime->userconf = old_wm->
runtime->userconf;
387 old_wm->
runtime->addonconf =
nullptr;
388 old_wm->
runtime->defaultconf =
nullptr;
389 old_wm->
runtime->userconf =
nullptr;
393 wm->runtime->winactive =
nullptr;
398 bool has_match =
false;
401 if (old_win->winid == win->winid) {
416 wm_setup_data->
old_wm =
nullptr;
445 wm_setup_data->
old_wm ==
nullptr)
455 else if (wm_setup_data->
old_wm !=
nullptr) {
474 MEM_delete(wm_setup_data);
554#define BKE_READ_EXOTIC_FAIL_PATH -3
555#define BKE_READ_EXOTIC_FAIL_FORMAT -2
556#define BKE_READ_EXOTIC_FAIL_OPEN -1
557#define BKE_READ_EXOTIC_OK_BLEND 0
559# define BKE_READ_EXOTIC_OK_OTHER 1
576 int filepath_len = strlen(filepath);
577 if (filepath_len > 0 &&
ELEM(filepath[filepath_len - 1],
'/',
'\\')) {
588 if (rawfile ==
nullptr) {
594 if (rawfile->
read(rawfile, header,
sizeof(header)) !=
sizeof(header)) {
595 rawfile->
close(rawfile);
598 rawfile->
seek(rawfile, 0, SEEK_SET);
601 if (
STREQLEN(header,
"BLENDER", 7)) {
602 rawfile->
close(rawfile);
619 if (compressed_file !=
nullptr) {
620 size_t len = compressed_file->
read(compressed_file, header,
sizeof(header));
621 compressed_file->
close(compressed_file);
622 if (
len ==
sizeof(header) &&
STREQLEN(header,
"BLENDER", 7)) {
627 rawfile->
close(rawfile);
662 if (scene->r.engine[0] &&
667 "Engine '%s' not available for scene '%s' (an add-on may need to be installed "
723 const char *filepath,
728 const bool use_data =
params->use_data;
729 const bool use_userdef =
params->use_userdef;
730 const bool is_startup_file =
params->is_startup_file;
731 const bool is_factory_startup =
params->is_factory_startup;
732 const bool reset_app_template =
params->reset_app_template;
734 bool addons_loaded =
false;
745 if (is_startup_file) {
748 if (!
params->is_first_time) {
750 bool reset_all = use_userdef;
751 if (use_userdef || reset_app_template) {
754 const char *imports[] = {
"bl_app_template_utils",
nullptr};
760 const char *imports[] = {
"bpy",
"addon_utils",
nullptr};
768 "bpy.utils.refresh_script_paths()\n"
770 "addon_utils.reset_all()");
775 addons_loaded =
true;
783 addons_loaded =
true;
792 if (is_factory_startup) {
815 if (is_factory_startup) {
835 if (is_startup_file) {
861 if (
wm->runtime->undo_stack ==
nullptr) {
908 if (success ==
false) {
926 double duration_whole_minutes, duration_whole_seconds;
927 double duration_libraries_minutes, duration_libraries_seconds;
928 double duration_lib_override_minutes, duration_lib_override_seconds;
929 double duration_lib_override_resync_minutes, duration_lib_override_resync_seconds;
930 double duration_lib_override_recursive_resync_minutes,
931 duration_lib_override_recursive_resync_seconds;
936 &duration_whole_minutes,
937 &duration_whole_seconds,
942 &duration_libraries_minutes,
943 &duration_libraries_seconds,
948 &duration_lib_override_minutes,
949 &duration_lib_override_seconds,
954 &duration_lib_override_resync_minutes,
955 &duration_lib_override_resync_seconds,
960 &duration_lib_override_recursive_resync_minutes,
961 &duration_lib_override_recursive_resync_seconds,
965 &
LOG,
"Blender file read in %.0fm%.2fs", duration_whole_minutes, duration_whole_seconds);
967 " * Loading libraries: %.0fm%.2fs",
968 duration_libraries_minutes,
969 duration_libraries_seconds);
971 " * Applying overrides: %.0fm%.2fs",
972 duration_lib_override_minutes,
973 duration_lib_override_seconds);
975 " * Resyncing overrides: %.0fm%.2fs (%d root overrides), including recursive "
976 "resyncs: %.0fm%.2fs)",
977 duration_lib_override_resync_minutes,
978 duration_lib_override_resync_seconds,
980 duration_lib_override_recursive_resync_minutes,
981 duration_lib_override_recursive_resync_seconds);
985 node_lib = node_lib->
next)
990 "Library \"%s\" needs overrides resync",
998 "%d libraries and %d linked data-blocks are missing (including %d ObjectData), "
999 "please check the Info and Outliner editors for details",
1007 "%d local ObjectData are reported to be missing, this should never happen",
1015 "%d libraries have overrides needing resync (auto resynced in %.0fm%.2fs), "
1016 "please check the Info editor for details",
1018 duration_lib_override_recursive_resync_minutes,
1019 duration_lib_override_recursive_resync_seconds);
1027 "Proxies have been removed from Blender (%d proxies were automatically converted "
1028 "to library overrides, %d proxies could not be converted and were cleared). "
1029 "Consider re-saving any library .blend file with the newest Blender version",
1037 "%d sequence strips were not read because they were in a channel larger than %d",
1049 "Loaded a pre-2.50 blend file, animation data has not been loaded. Open & save the file "
1050 "with Blender v4.5 to convert animation data.");
1055 const char *filepath,
1056 const bool use_scripts_autoexec_check,
1060 const bool do_history_file_update = (
G.background ==
false) &&
1062 bool success =
false;
1064 const bool use_data =
true;
1065 const bool use_userdef =
false;
1085 params.is_startup =
false;
1095 if (bfd !=
nullptr) {
1107 const int G_f_orig =
G.f;
1111 C, bfd, &
params, wm_setup_data, &bf_reports,
false,
nullptr);
1118 if (
G.f != G_f_orig) {
1121 G.f = (
G.f & ~flags_keep) | (G_f_orig & flags_keep);
1128 if (use_scripts_autoexec_check) {
1134 if (do_history_file_update) {
1139 read_file_post_params.
use_data = use_data;
1144 read_file_post_params.
success =
true;
1145 read_file_post_params.
is_alloc =
false;
1155 else if (retval == BKE_READ_EXOTIC_OK_OTHER) {
1156 BKE_undo_write(
C,
"Import file");
1162 "Cannot read file \"%s\": %s",
1164 errno ? strerror(errno) :
RPT_(
"unable to open the file"));
1239 bool success =
false;
1242 const bool use_data = params_homefile->
use_data;
1243 const bool use_userdef = params_homefile->
use_userdef;
1249 const bool use_factory_settings_app_template_only =
1255 bool filepath_startup_is_factory =
true;
1261 char app_template_system[
FILE_MAX];
1264 char app_template_config[
FILE_MAX];
1268 if (use_data ==
false) {
1271 if (use_userdef ==
false) {
1277 bool is_factory_startup =
true;
1280 bool update_defaults =
false;
1285 if (filepath_startup_override !=
nullptr) {
1288 else if (app_template_override) {
1292 else if (!use_factory_settings &&
U.app_template[0]) {
1296 const bool reset_app_template = ((!
app_template &&
U.app_template[0]) ||
1300 BLI_assert((use_factory_settings && filepath_startup_override) == 0);
1307 if (reset_app_template) {
1313 if (use_userdef || reset_app_template) {
1324 const char *imports[] = {
"addon_utils",
nullptr};
1348 filepath_startup[0] =
'\0';
1349 filepath_userdef[0] =
'\0';
1350 app_template_system[0] =
'\0';
1351 app_template_config[0] =
'\0';
1354 if (!use_factory_settings) {
1355 if (cfgdir.has_value()) {
1358 filepath_startup_is_factory =
false;
1365 use_factory_settings =
true;
1368 if (filepath_startup_override) {
1369 STRNCPY(filepath_startup, filepath_startup_override);
1370 filepath_startup_is_factory =
false;
1376 if (use_factory_settings_app_template_only) {
1380 else if (!use_factory_settings &&
BLI_exists(filepath_userdef)) {
1382 if (userdef !=
nullptr) {
1383 CLOG_INFO(&
LOG,
"Read prefs: \"%s\"", filepath_userdef);
1395 app_template, app_template_system,
sizeof(app_template_system)))
1405 if (!use_factory_settings && cfgdir.has_value()) {
1407 app_template_config,
sizeof(app_template_config), cfgdir->c_str(),
app_template);
1410 filepath_startup_is_factory =
false;
1411 if (
BLI_access(filepath_startup, R_OK) != 0) {
1412 filepath_startup[0] =
'\0';
1416 filepath_startup[0] =
'\0';
1419 if (filepath_startup[0] ==
'\0') {
1422 filepath_startup_is_factory =
true;
1425 update_defaults =
true;
1429 if (!use_factory_settings || (filepath_startup[0] !=
'\0')) {
1430 if (
BLI_access(filepath_startup, R_OK) == 0) {
1432 params.is_startup =
true;
1433 params.is_factory_settings = use_factory_settings;
1439 if (bfd !=
nullptr) {
1440 CLOG_INFO(&
LOG,
"Read startup: \"%s\"", filepath_startup);
1448 update_defaults && use_data,
1455 is_factory_startup = filepath_startup_is_factory;
1467 if (success ==
false && filepath_startup_override && reports) {
1472 bool loaded_factory_settings =
false;
1473 if (success ==
false) {
1480 if (bfd !=
nullptr) {
1484 C, bfd, &read_file_params, wm_setup_data, &read_report,
true,
nullptr);
1486 loaded_factory_settings =
true;
1491 if (use_empty_data) {
1498 if (app_template_system[0] !=
'\0') {
1500 temp_path[0] =
'\0';
1501 if (!use_factory_settings) {
1504 temp_path[0] =
'\0';
1508 if (temp_path[0] ==
'\0') {
1513 UserDef *userdef_template =
nullptr;
1517 if (userdef_template) {
1518 CLOG_INFO(&
LOG,
"Read prefs from app-template: \"%s\"", temp_path);
1521 if (userdef_template ==
nullptr) {
1525 if (userdef_template) {
1527 userdef_template =
nullptr;
1532 if (app_template_override) {
1533 STRNCPY(
U.app_template, app_template_override);
1552 if (
wm->runtime->defaultconf) {
1566 params_file_read_post.
use_data = use_data;
1574 params_file_read_post.
success = success;
1575 params_file_read_post.
is_alloc =
false;
1577 if (r_params_file_read_post ==
nullptr) {
1581 params_file_read_post.
is_alloc =
true;
1583 **r_params_file_read_post = params_file_read_post;
1600 const char *filepath =
"";
1603 if (params_file_read_post->
use_data) {
1607 if (params_file_read_post->
is_alloc) {
1621 if (!cfgdir.has_value()) {
1636 for (
l = lines,
num = 0;
l && (
num <
U.recent_files);
l =
l->next) {
1637 const char *line =
static_cast<const char *
>(
l->link);
1689 if (!user_config_dir.has_value()) {
1698 fprintf(fp,
"%s\n", recent->filepath);
1713 if (blendfile_path[0] ==
'\0') {
1717 recent =
static_cast<RecentFile *
>(
G.recent_files.first);
1729 recent = recent_next)
1731 recent_next = recent->
next;
1771#ifdef USE_THUMBNAIL_FAST_DOWNSCALE
1773 const int src_size[2],
1774 const int dst_size[2])
1791 BLI_assert(dst_size[0] <= src_size[0] && dst_size[1] <= src_size[1]);
1803 const uint32_t src_size_x = src_size[0];
1804 const uint32_t src_size_y = src_size[1];
1806 const uint32_t dst_size_x = dst_size[0];
1807 const uint32_t dst_size_y = dst_size[1];
1808 const uint8_t *src_px = src_rect;
1811 for (uint32_t dst_y = 0; dst_y < dst_size_y; dst_y++) {
1812 const uint32_t src_y_beg = src_y;
1813 const uint32_t src_y_end = ((dst_y + 1) * src_size_y) / dst_size_y;
1814 for (; src_y < src_y_end; src_y++) {
1815 uint32_t *accum = accum_row;
1817 for (uint32_t dst_x = 0; dst_x < dst_size_x; dst_x++, accum += 4) {
1818 const uint32_t src_x_end = ((dst_x + 1) * src_size_x) / dst_size_x;
1819 for (; src_x < src_x_end; src_x++) {
1820 accum[0] += uint32_t(src_px[0]);
1821 accum[1] += uint32_t(src_px[1]);
1822 accum[2] += uint32_t(src_px[2]);
1823 accum[3] += uint32_t(src_px[3]);
1828 BLI_assert(accum == accum_row + (4 * dst_size[0]));
1831 uint32_t *accum = accum_row;
1832 uint8_t *dst_px = dst_rect + ((dst_y * dst_size_x) * 4);
1833 uint32_t src_x_beg = 0;
1834 const uint32_t span_y = src_y_end - src_y_beg;
1835 for (uint32_t dst_x = 0; dst_x < dst_size_x; dst_x++) {
1836 const uint32_t src_x_end = ((dst_x + 1) * src_size_x) / dst_size_x;
1837 const uint32_t span_x = src_x_end - src_x_beg;
1839 const uint32_t sample_count = span_x * span_y;
1840 dst_px[0] = uint8_t(accum[0] / sample_count);
1841 dst_px[1] = uint8_t(accum[1] / sample_count);
1842 dst_px[2] = uint8_t(accum[2] / sample_count);
1843 dst_px[3] = uint8_t(accum[3] / sample_count);
1844 accum[0] = accum[1] = accum[2] = accum[3] = 0;
1848 src_x_beg = src_x_end;
1850 sample_count_all += sample_count;
1854 BLI_assert(src_px == src_rect + (
sizeof(uint8_t[4]) * src_size[0] * src_size[1]));
1855 BLI_assert(sample_count_all ==
size_t(src_size[0]) *
size_t(src_size[1]));
1884 if (
G.background || (win ==
nullptr)) {
1897 ImBuf *ibuf =
nullptr;
1903#ifdef USE_THUMBNAIL_FAST_DOWNSCALE
1904 if ((thumb_size_2x[0] <= win_size[0]) && (thumb_size_2x[1] <= win_size[1])) {
1936 char version_str[10];
1959 if (
G.background || scene ==
nullptr) {
1967 const float pixelsize_old =
U.pixelsize;
1968 wmWindow *windrawable_old =
wm->runtime->windrawable;
1969 char err_out[256] =
"unknown";
1976 if (screen !=
nullptr) {
1984 if (scene->
camera ==
nullptr && v3d ==
nullptr) {
1997 (v3d) ? &v3d->
shading :
nullptr,
2028 U.pixelsize = pixelsize_old;
2031 if (windrawable_old) {
2044 char version_str[10];
2062 CLOG_WARN(&
LOG,
"failed to create thumbnail: %s", err_out);
2086 printf(
"%s: \"%s\"\n", success ?
"written" :
"failed", filepath);
2095 const char *filepath,
2098 const int filepath_len = strlen(filepath);
2099 if (filepath_len == 0) {
2112 BKE_report(reports,
RPT_ERROR,
"Cannot overwrite files that are managed by the asset system");
2117 if (
BLI_path_cmp(li->runtime->filepath_abs, filepath) == 0) {
2130 const char *filepath,
2133 bool use_save_as_copy,
2138 ImBuf *ibuf_thumb =
nullptr;
2156 if (
const int st_mode =
BLI_exists(filepath)) {
2161 reports,
RPT_ERROR,
"Cannot save blend file, path \"%s\" is not writable", filepath);
2171 reports,
RPT_ERROR,
"Cannot save blend file, path \"%s\" is a directory", filepath);
2204 if (thumb !=
nullptr) {
2209 int file_preview_type =
U.file_preview_type;
2214 bool do_render = (scene !=
nullptr && scene->
camera !=
nullptr && screen !=
nullptr &&
2219 switch (file_preview_type) {
2250 blend_write_params.
thumb = thumb;
2252 const bool success =
BLO_write_file(bmain, filepath, fileflags, &blend_write_params, reports);
2255 const bool do_history_file_update = (
G.background ==
false) &&
2258 if (use_save_as_copy ==
false) {
2265 if (do_history_file_update) {
2282 if (thumb && thumb != main_thumb) {
2299 const int pid =
abs(getpid());
2300 char filename[1024];
2307 if (blendfile_path && (blendfile_path[0] !=
'\0')) {
2309 int len = strlen(basename) - 6;
2310 SNPRINTF(filename,
"%.*s_%d_autosave.blend",
len, basename, pid);
2313 SNPRINTF(filename,
"%d_autosave.blend", pid);
2322 if (
wm->file_saved) {
2348 return wm->autosave_scheduled;
2369 wm->autosave_scheduled =
false;
2388 if (
wm->autosavetimer) {
2390 wm->autosavetimer =
nullptr;
2417 wm->autosave_scheduled =
false;
2419 wm->autosave_scheduled =
true;
2458 "use_factory_startup_app_template_only",
2460 "Factory Startup App-Template Only",
2488 bool use_scripts_autoexec_check =
false;
2497 use_scripts_autoexec_check =
true;
2499 return use_scripts_autoexec_check;
2520 const char *
app_template =
U.app_template[0] ?
U.app_template :
nullptr;
2523 if (!cfgdir.has_value()) {
2559 bmain, filepath, fileflags, &blend_write_params, op->
reports);
2575 if (!
U.app_template[0]) {
2578 IFACE_(
"Overwrite Startup File"),
2579 IFACE_(
"Blender will start next time as it is now."),
2588 std::string message = fmt::format(
2589 fmt::runtime(
IFACE_(
"Template \"{}\" will start next time as it is now.")),
2593 IFACE_(
"Overwrite Template Startup File"),
2602 ot->name =
"Save Startup File";
2603 ot->idname =
"WM_OT_save_homefile";
2604 ot->description =
"Make the current file the default startup file";
2631 ot->name =
"Save Preferences";
2632 ot->idname =
"WM_OT_save_userpref";
2633 ot->description =
"Make the current preferences default";
2650#define USERDEF_RESTORE(member) \
2652 userdef_curr->member = userdef_prev->member; \
2659#undef USERDEF_RESTORE
2716 const bool use_data =
false;
2717 const bool use_userdef =
true;
2718 const bool use_factory_settings =
STREQ(op->
type->
idname,
"WM_OT_read_factory_userpref");
2719 const bool use_factory_settings_app_template_only =
2720 (use_factory_settings &&
RNA_boolean_get(op->
ptr,
"use_factory_startup_app_template_only"));
2724 UserDef U_backup = blender::dna::shallow_copy(
U);
2727 read_homefile_params.
use_data = use_data;
2731 use_factory_settings_app_template_only;
2742 if (use_factory_settings) {
2743 U.runtime.is_dirty =
true;
2758 ot->name =
"Load Preferences";
2759 ot->idname =
"WM_OT_read_userpref";
2760 ot->description =
"Load last saved preferences";
2772 const bool template_only =
U.app_template[0] &&
2775 if (template_only) {
2778 title = fmt::format(fmt::runtime(
IFACE_(
"Load Factory \"{}\" Preferences.")),
2782 title =
IFACE_(
"Load Factory Blender Preferences");
2789 IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\""),
2797 ot->name =
"Load Factory Preferences";
2798 ot->idname =
"WM_OT_read_factory_userpref";
2800 "Load factory default preferences. "
2801 "To make changes to preferences permanent, use \"Save Preferences\"";
2824 ot->name =
"Reload History File";
2825 ot->idname =
"WM_OT_read_history";
2826 ot->description =
"Reloads history and bookmarks";
2846 "WM_OT_read_factory_settings");
2847 const bool use_factory_settings = use_factory_startup_and_userdef ||
2849 const bool use_factory_settings_app_template_only =
2850 (use_factory_startup_and_userdef &&
2853 bool use_userdef =
false;
2855 const char *filepath =
nullptr;
2856 UserDef U_backup = blender::dna::shallow_copy(
U);
2858 if (!use_factory_settings) {
2868 filepath = filepath_buf;
2871 op->
reports,
RPT_ERROR,
"Cannot read alternative start-up file: \"%s\"", filepath);
2877 if (use_factory_startup_and_userdef) {
2888 char app_template_buf[
sizeof(
U.app_template)];
2891 const bool use_splash = !use_factory_settings &&
RNA_boolean_get(op->
ptr,
"use_splash");
2898 if (!use_factory_settings) {
2917 read_homefile_params.
use_data =
true;
2921 use_factory_settings_app_template_only;
2935 if (use_factory_settings) {
2936 U.runtime.is_dirty =
true;
2954 "WM_OT_read_homefile",
2974 prop =
RNA_def_string(
ot->srna,
"app_template",
"Template",
sizeof(
U.app_template),
"",
"");
2982 "After loading, remove everything except scenes, windows, and workspaces. This makes it "
2983 "possible to load the startup file with its scene configuration and window layout intact, "
2984 "but no objects, materials, animations, ...");
2991 ot->name =
"Reload Start-Up File";
2992 ot->idname =
"WM_OT_read_homefile";
2993 ot->description =
"Open the default file";
3003 "Path to an alternative start-up file");
3008 ot->srna,
"load_ui",
true,
"Load UI",
"Load user interface setup from the .blend file");
3019 "use_factory_startup",
3022 "Load the default ('factory startup') blend file. "
3023 "This is independent of the normal start-up file that the user can save");
3039 const bool template_only =
U.app_template[0] &&
3042 if (template_only) {
3045 title = fmt::format(fmt::runtime(
IFACE_(
"Load Factory \"{}\" Startup File and Preferences")),
3049 title =
IFACE_(
"Load Factory Default Startup File and Preferences");
3056 unsaved ?
IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\".\n"
3057 "Warning: Your file is unsaved! Proceeding will abandon your changes.") :
3058 IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\"."),
3066 ot->name =
"Load Factory Settings";
3067 ot->idname =
"WM_OT_read_factory_settings";
3069 "Load factory default startup file and preferences. "
3070 "To make changes permanent, use \"Save Startup File\" and \"Save Preferences\"";
3091 const char *filepath,
3092 const bool use_scripts_autoexec_check,
3099 const bool success =
WM_file_read(
C, filepath, use_scripts_autoexec_check, reports);
3134 for (
int i = 0; targets[
i].
run;
i++) {
3137 return target.
run(
C, op);
3161 "WM_OT_open_mainfile",
3198 if (
G.recent_files.first) {
3279 if (
BLI_stat(filepath, &stats) == -1) {
3280 return fmt::format(
"{}\n\n{}", filepath,
TIP_(
"File Not Found"));
3286 bool is_today, is_yesterday;
3288 nullptr,
int64_t(stats.st_mtime),
false, time_str, date_str, &is_today, &is_yesterday);
3289 if (is_today || is_yesterday) {
3297 return fmt::format(
"{}\n\n{}: {} {}\n{}: {}",
3316 bool is_untrusted =
false;
3325 *(lslash + 1) =
'\0';
3331 is_untrusted =
true;
3339 return is_untrusted;
3346 const char *autoexec_text;
3352 autoexec_text =
IFACE_(
"Trusted Source [Untrusted Path]");
3353 col->active_set(
false);
3354 col->enabled_set(
false);
3357 autoexec_text =
IFACE_(
"Trusted Source");
3369 "Allow .blend file to execute scripts automatically, default available from "
3370 "system preferences");
3376 ot->idname =
"WM_OT_open_mainfile";
3377 ot->description =
"Open a Blender file";
3395 ot->srna,
"load_ui",
true,
"Load UI",
"Load user interface setup in the .blend file");
3400 ot->srna,
"display_file_selector",
true,
"Display File Selector",
"");
3416 std::string message =
IFACE_(
"Any unsaved changes will be lost.");
3419 message +=
IFACE_(
"Warning: There are unsaved external image(s).");
3424 IFACE_(
"Revert to the Saved File"),
3453 return (blendfile_path[0] !=
'\0');
3458 ot->name =
"Revert";
3459 ot->idname =
"WM_OT_revert_mainfile";
3460 ot->description =
"Reload the saved file";
3476 const bool use_scripts_autoexec_check,
3489 const bool use_scripts_autoexec_check)
3493 if (!
G.background) {
3495 PointerRNA *props_ptr = MEM_new<PointerRNA>(__func__);
3514 "WM_OT_recover_last_session",
3538 ot->name =
"Recover Last Session";
3539 ot->idname =
"WM_OT_recover_last_session";
3572 if (!
G.background) {
3574 PointerRNA *props_ptr = MEM_new<PointerRNA>(__func__);
3601 ot->name =
"Recover Auto Save";
3602 ot->idname =
"WM_OT_recover_auto_save";
3603 ot->description =
"Open an automatically saved file to recover it";
3644 if (blendfile_path[0] !=
'\0') {
3663 if ((blendfile_path[0] ==
'\0') &&
G.recent_files.first) {
3668 STRNCPY(filepath, blendfile_path);
3725 if (is_filepath_set) {
3733 if (filepath[0] ==
'\0') {
3736 "Unable to save an unsaved file with an empty or unset \"filepath\" property");
3740 if ((is_save_as ==
false) && is_incremental) {
3745 if (
num == 0 && digits == 0) {
3750 const int tries_limit = 1000;
3758 }
while (in_use && tries < tries_limit &&
num < INT_MAX);
3765 const int fileflags_orig =
G.fileflags;
3766 int fileflags =
G.fileflags;
3772 C, filepath, fileflags, remap_mode, use_save_as_copy, op->
reports);
3778 G.fileflags = fileflags_orig;
3781 if (success ==
false) {
3787 if (is_incremental) {
3790 else if (is_save_as) {
3792 if (use_save_as_copy) {
3803 if (!use_save_as_copy) {
3817 wm->autosave_scheduled =
false;
3846 return CTX_IFACE_(
ot->translation_context,
"Save Copy");
3857 "Save the current file in the desired location but do not make the saved file active"));
3866 ot->name =
"Save As";
3867 ot->idname =
"WM_OT_save_as_mainfile";
3868 ot->description =
"Save the current file in the desired location";
3884 RNA_def_boolean(
ot->srna,
"compress",
false,
"Compress",
"Write compressed .blend file");
3889 "Remap relative paths when saving to a different directory");
3895 "Save a copy of the actual working state but does not make saved file active");
3924 if (blendfile_path[0] !=
'\0') {
3947 "Save the current Blender file with a numerically incremented name that does not "
3948 "overwrite any existing files");
3955 ot->name =
"Save Blender File";
3956 ot->idname =
"WM_OT_save_mainfile";
3957 ot->description =
"Save the current Blender file";
3973 RNA_def_boolean(
ot->srna,
"compress",
false,
"Compress",
"Write compressed .blend file");
3978 "Remap relative paths when saving to a different directory");
3980 prop =
RNA_def_boolean(
ot->srna,
"exit",
false,
"Exit",
"Exit Blender after saving");
3987 "Save the current Blender file with a numerically incremented name that "
3988 "does not overwrite any existing files");
4003 {0,
nullptr, 0,
nullptr,
nullptr},
4011 C, op, event,
IFACE_(
"Clear Recent Files List"),
IFACE_(
"Remove"));
4047 ot->name =
"Clear Recent Files List";
4048 ot->idname =
"WM_OT_clear_recent_files";
4049 ot->description =
"Clear the recent files list";
4127 const char *title =
RPT_(
4128 "For security reasons, automatic execution of Python scripts "
4129 "in this file was disabled:");
4130 const char *message =
RPT_(
"This may lead to unexpected behavior");
4131 const char *checkbox_text =
RPT_(
"Permanently allow execution of scripts");
4137 text_width = std::max(text_width,
4139 text_width = std::max(
4144 const int dialog_width = std::max(
int(400.0f *
UI_SCALE_FAC),
4154 col->label(message, ICON_NONE);
4159 layout->
prop(&pref_ptr,
"use_scripts_auto_execute",
UI_ITEM_NONE, checkbox_text, ICON_NONE);
4166 split->scale_y_set(1.2f);
4176 if ((blendfile_path[0] !=
'\0') &&
wm->file_saved) {
4181 IFACE_(
"Allow Execution"),
4187 TIP_(
"Reload file with execution of Python scripts enabled"));
4196 IFACE_(
"Allow Execution"),
4202 TIP_(
"Enable scripts"));
4219 TIP_(
"Continue using file without Python scripts"));
4260 if (
ot ==
nullptr) {
4262 ptr = MEM_new<PointerRNA>(__func__);
4289 wmWindow *win = (
wm->runtime->winactive) ?
wm->runtime->winactive :
4307 if (!
G_MAIN->is_read_invalid) {
4311 G_MAIN->is_read_invalid =
false;
4314 wmWindow *win = (
wm->runtime->winactive) ?
wm->runtime->winactive :
4326 RPT_(
"Unable to Load File"),
4327 RPT_(
"The file specified is not a valid Blend document."),
4363 char writer_ver_str[16];
4364 char current_ver_str[16];
4373 writer_ver_str,
sizeof(writer_ver_str), bmain->
versionfile, -1);
4378 char message_line1[256];
4379 char message_line2[256];
4381 RPT_(
"This file was saved by a newer version of Blender (%s)."),
4384 RPT_(
"Saving it with this Blender (%s) may cause loss of data."),
4386 layout->
label(message_line1, ICON_NONE);
4387 layout->
label(message_line2, ICON_NONE);
4395 layout->
label(
RPT_(
"This file is managed by the Blender asset system. It can only be"),
4397 layout->
label(
RPT_(
"saved as a new, regular file."), ICON_NONE);
4405 RPT_(
"Displays, views or color spaces in this file were missing and have been changed."),
4407 layout->
label(
RPT_(
"Saving it with this OpenColorIO configuration may cause loss of data."),
4421 block,
ButType::But, 0, ICON_NONE,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
nullptr,
"");
4440 PointerRNA *operator_propptr_p = &operator_propptr;
4445 "WM_OT_save_mainfile",
4456 block,
ButType::But, 0, ICON_NONE,
IFACE_(
"Overwrite"), 0, 0, 0,
UI_UNIT_Y,
nullptr,
"");
4474 block,
ButType::But, 0, ICON_NONE,
IFACE_(
"Save As..."), 0, 0, 0,
UI_UNIT_Y,
nullptr,
"");
4497 RPT_(
"Cannot overwrite asset system files. Save as new file"),
4501 uiItemL_ex(layout,
RPT_(
"with an older Blender version?"), ICON_NONE,
true,
false);
4505 layout,
RPT_(
"Overwrite file with an older Blender version?"), ICON_NONE,
true,
false);
4510 RPT_(
"Cannot overwrite asset system files. Save as new file?"),
4521 RPT_(
"Overwrite file with current OpenColorIO configuration?"),
4530 if (blendfile_path[0] !=
'\0') {
4540 layout->
label(filename, ICON_NONE);
4550 split->scale_y_set(1.2f);
4552 split->column(
false);
4555 if (allow_overwrite) {
4561 split_right->
column(
false);
4564 split_right->
column(
false);
4567 split_right->
column(
false);
4578 callback->
exec =
nullptr;
4620 bool execute_callback =
true;
4633 execute_callback =
false;
4639 if (file_has_been_saved_before) {
4649 "WM_OT_save_as_mainfile",
4653 execute_callback =
false;
4659 execute_callback =
false;
4666 execute_callback =
false;
4669 if (execute_callback) {
4678 block,
ButType::But, 0, ICON_NONE,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
nullptr,
"");
4686 block,
ButType::But, 0, ICON_NONE,
IFACE_(
"Don't Save"), 0, 0, 0,
UI_UNIT_Y,
nullptr,
"");
4693 const bool needs_overwrite_confirm)
4701 needs_overwrite_confirm ?
IFACE_(
"Save As...") :
IFACE_(
"Save"),
4717 char *save_catalogs_when_file_is_closed =
static_cast<char *
>(arg1);
4719 *save_catalogs_when_file_is_closed != 0);
4740 uiItemL_ex(layout,
RPT_(
"Save changes before closing?"), ICON_NONE,
true,
false);
4745 if (blendfile_path[0] !=
'\0') {
4752 layout->
label(filename, ICON_NONE);
4755 if (needs_overwrite_confirm) {
4772 char *message =
BLI_strdupn(report->message, report->len);
4773 char *path_info = strstr(message,
": ");
4776 path_info[1] =
'\0';
4780 uiItemL_ex(row, message, ICON_NONE,
false,
true);
4782 uiItemL_ex(row, path_info, ICON_NONE,
false,
true);
4788 bool has_extra_checkboxes =
false;
4791 if (modified_images_count > 0) {
4793 SNPRINTF(message,
RPT_(
"Save %u modified image(s)"), modified_images_count);
4795 if (!has_extra_checkboxes) {
4811 has_extra_checkboxes =
true;
4815 static char save_catalogs_when_file_is_closed;
4820 if (!has_extra_checkboxes) {
4827 "Save modified asset catalogs",
4832 &save_catalogs_when_file_is_closed,
4838 &save_catalogs_when_file_is_closed,
4840 has_extra_checkboxes =
true;
4849 const bool windows_layout =
true;
4851 const bool windows_layout =
false;
4854 if (windows_layout) {
4858 split->scale_y_set(1.2f);
4860 split->column(
false);
4863 split->column(
false);
4866 split->column(
false);
4873 split->scale_y_set(1.2f);
4875 split->column(
false);
4880 split_right->
column(
false);
4883 split_right->
column(
false);
4886 split_right->
column(
false);
4913 callback->
exec = post_action_fn;
void AS_asset_libraries_exit()
bool AS_asset_library_has_any_unsaved_catalogs()
bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module)
bool BKE_appdir_app_template_id_search(const char *app_template, char *path, size_t path_maxncpy) ATTR_NONNULL(1)
void BKE_tempdir_init(const char *userdir)
#define BLENDER_USERPREF_FILE
bool BKE_appdir_app_template_has_userpref(const char *app_template) ATTR_NONNULL(1)
#define BLENDER_HISTORY_FILE
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
#define BLENDER_STARTUP_FILE
#define BLENDER_QUIT_FILE
const char * BKE_tempdir_base() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool BKE_appdir_app_template_any()
std::optional< std::string > BKE_appdir_folder_id_create(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
bool BKE_autoexec_match(const char *path)
void BKE_blender_userdef_app_template_data_set_and_free(UserDef *userdef)
void BKE_blender_userdef_data_set_and_free(UserDef *userdef)
#define BLENDER_FILE_SUBVERSION
void BKE_blender_version_blendfile_string_from_values(char *str_buff, const size_t str_buff_maxncpy, const short file_version, const short file_subversion)
#define BLENDER_FILE_VERSION
void BKE_blendfile_read_setup_readfile(bContext *C, BlendFileData *bfd, const BlendFileReadParams *params, BlendFileReadWMSetupData *wm_setup_data, BlendFileReadReport *reports, bool startup_update_defaults, const char *startup_app_template)
bool BKE_blendfile_userdef_write_all(ReportList *reports)
#define BLENDER_ASSET_FILE_SUFFIX
void BKE_blendfile_read_make_empty(bContext *C)
bool BKE_blendfile_extension_check(const char *str)
UserDef * BKE_blendfile_userdef_from_defaults()
UserDef * BKE_blendfile_userdef_read(const char *filepath, ReportList *reports)
BlendFileData * BKE_blendfile_read(const char *filepath, const BlendFileReadParams *params, BlendFileReadReport *reports)
BlendFileData * BKE_blendfile_read_from_memory(const void *file_buf, int file_buf_size, const BlendFileReadParams *params, ReportList *reports)
void BKE_callback_exec_string(Main *bmain, eCbEvent evt, const char *str)
void BKE_callback_exec_null(Main *bmain, eCbEvent evt)
@ BKE_CB_EVT_LOAD_FACTORY_STARTUP_POST
@ BKE_CB_EVT_LOAD_FACTORY_USERDEF_POST
@ BKE_CB_EVT_LOAD_POST_FAIL
@ BKE_CB_EVT_EXTENSION_REPOS_UPDATE_PRE
@ BKE_CB_EVT_VERSION_UPDATE
@ BKE_CB_EVT_SAVE_POST_FAIL
@ BKE_CB_EVT_EXTENSION_REPOS_UPDATE_POST
ReportList * CTX_wm_reports(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
bool CTX_py_init_get(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
void CTX_wm_window_set(bContext *C, wmWindow *win)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
void CTX_wm_region_popup_set(bContext *C, ARegion *region_popup)
@ 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_READFILE
#define G_FLAG_INTERNET_OVERRIDE_PREF_ANY
@ G_BACKGROUND_NO_DEPSGRAPH
#define G_FLAG_ALL_RUNTIME
void IDP_FreeProperty(IDProperty *prop)
IDProperty * IDP_CopyProperty(const IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BKE_libblock_free_data_py(ID *id)
void BKE_libblock_free_data(ID *id, bool do_id_user) ATTR_NONNULL()
IDNewNameResult BKE_libblock_rename(Main &bmain, ID &id, blender::StringRefNull name, const IDNewNameMode mode=IDNewNameMode::RenameExistingNever)
void BKE_lib_override_library_main_operations_create(Main *bmain, bool force_auto, int *r_report_flags)
BlendThumbnail * BKE_main_thumbnail_from_imbuf(Main *bmain, ImBuf *img)
bool BKE_main_needs_overwrite_confirm(const Main *bmain)
ImBuf * BKE_main_thumbnail_to_imbuf(Main *bmain, BlendThumbnail *data)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
BlendThumbnail * BKE_main_thumbnail_from_buffer(Main *bmain, const uint8_t *rect, const int size[2])
const char * BKE_main_blendfile_path_from_global()
bool BKE_main_namemap_validate(Main &bmain)
#define FOREACH_NODETREE_END
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_reports_free(ReportList *reports)
void BKE_report_print_level_set(ReportList *reports, eReportType level)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_reports_init(ReportList *reports, int flag)
void BKE_scene_free_depsgraph_hash(Scene *scene)
ScrArea * BKE_screen_find_big_area(const bScreen *screen, int spacetype, short min)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
void BKE_sound_init(struct Main *bmain)
void BKE_undosys_stack_init_from_context(UndoStack *ustack, bContext *C)
void BKE_undosys_stack_clear(UndoStack *ustack)
void BKE_undosys_stack_init_from_main(UndoStack *ustack, Main *bmain)
UndoStack * BKE_undosys_stack_create()
void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace) SETTER_ATTRS
WorkSpaceLayout * BKE_workspace_layout_find_global(const Main *bmain, const bScreen *screen, WorkSpace **r_workspace) ATTR_NONNULL(1
#define BLF_DRAW_STR_DUMMY_MAX
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
#define BLI_assert_unreachable()
#define BLI_STATIC_ASSERT(a, msg)
#define BLI_assert_msg(a, msg)
File and directory operations.
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 *path, bool dir, bool recursive) ATTR_NONNULL()
struct LinkNode * BLI_file_read_as_lines(const char *filepath) ATTR_WARN_UNUSED_RESULT 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])
void BLI_file_free_lines(struct LinkNode *lines)
bool BLI_file_magic_is_zstd(const char header[4])
int BLI_access(const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_rename_overwrite(const char *from, const char *to) 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()
#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_zstd(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
FileReader * BLI_filereader_new_file(int filedes) ATTR_WARN_UNUSED_RESULT
FileReader * BLI_filereader_new_gzip(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count_at_most(const ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findstring_ptr(const 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)
ATTR_WARN_UNUSED_RESULT const size_t num
bool BLI_path_filename_ensure(char *filepath, size_t filepath_maxncpy, const char *filename) ATTR_NONNULL(1
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void BLI_path_to_display_name(char *display_name, int display_name_maxncpy, const char *name) ATTR_NONNULL(1
bool BLI_path_extension_replace(char *path, size_t path_maxncpy, const char *ext) ATTR_NONNULL(1
#define BLI_path_join(...)
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
int BLI_path_canonicalize_native(char *path, int path_maxncpy)
bool BLI_path_extension_ensure(char *path, size_t path_maxncpy, const char *ext) ATTR_NONNULL(1
int BLI_path_sequence_decode(const char *path, char *head, size_t head_maxncpy, char *tail, size_t tail_maxncpy, unsigned short *r_digits_len)
void void BLI_path_split_dir_part(const char *filepath, char *dir, size_t dir_maxncpy) ATTR_NONNULL(1
const char * BLI_path_slash_rfind(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void BLI_path_sequence_encode(char *path, size_t path_maxncpy, const char *head, const char *tail, unsigned short numlen, int pic)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define SNPRINTF(dst, format,...)
int BLI_str_rstrip_digits(char *str) ATTR_NONNULL()
char * STRNCPY(char(&dst)[N], const char *src)
#define SNPRINTF_UTF8(dst, format,...)
int BLI_thread_is_main(void)
Platform independent time functions.
double BLI_time_now_seconds(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(UserDef *userdef)
external writefile.cc function prototypes.
bool BLO_write_file(Main *mainvar, const char *filepath, int write_flags, const BlendFileWriteParams *params, ReportList *reports)
@ BLO_WRITE_PATH_REMAP_NONE
@ BLO_WRITE_PATH_REMAP_ABSOLUTE
@ BLO_WRITE_PATH_REMAP_RELATIVE
bool BLT_translate_new_dataname()
#define BLT_I18NCONTEXT_ID_WORKSPACE
#define CTX_IFACE_(context, msgid)
#define CTX_DATA_(context, msgid)
void BPY_python_reset(bContext *C)
bool BPY_run_string_eval(bContext *C, const char *imports[], const char *expr)
bool BPY_run_string_exec(bContext *C, const char *imports[], const char *expr)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO_NOCHECK(clg_ref, format,...)
#define CLOG_INFO(clg_ref,...)
@ USER_SCRIPT_AUTOEXEC_DISABLE
@ USER_FILE_PREVIEW_CAMERA
@ USER_FILE_PREVIEW_SCREENSHOT
@ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS
@ V3D_RUNTIME_LOCAL_MAYBE_EMPTY
int datatoc_startup_blend_size
const char datatoc_startup_blend[]
void ED_file_read_bookmarks()
int ED_image_save_all_modified_info(const Main *bmain, ReportList *reports)
bool ED_image_should_save_modified(const Main *bmain)
bool ED_image_save_all_modified(const bContext *C, ReportList *reports)
void ED_outliner_select_sync_from_all_tag(bContext *C)
void ED_preview_restart_queue_free()
void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
WorkSpaceLayout * ED_workspace_layout_duplicate(Main *bmain, WorkSpace *workspace, const WorkSpaceLayout *layout_old, wmWindow *win) ATTR_NONNULL()
MemFile * ED_undosys_stack_memfile_get_if_active(UndoStack *ustack)
void ED_editors_exit(Main *bmain, bool do_undo_system)
bool ED_editors_flush_edits(Main *bmain)
void ED_editors_init(bContext *C)
void ED_view3d_local_collections_reset(const bContext *C, bool reset_all)
ImBuf * ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, Scene *scene, eDrawType drawtype, View3D *v3d, ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, bool restore_rv3d_mats, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256])
ImBuf * ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, Scene *scene, View3DShading *shading_override, eDrawType drawtype, Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256])
GHOST C-API function and type declarations.
void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr user_data)
void GHOST_addToSystemRecentFiles(const char *filepath)
static void split(const char *text, const char *seps, char ***str, int *count)
bool GPU_backend_type_selection_is_overridden()
void GPU_backend_type_selection_set_override(GPUBackendType backend_type)
bool GPU_backend_type_selection_detect()
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
ImBuf * IMB_allocFromBufferOwn(uint8_t *byte_buffer, float *float_buffer, unsigned int w, unsigned int h, unsigned int channels)
void IMB_freeImBuf(ImBuf *ibuf)
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
ImBuf * IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, ImBuf *img)
void IMB_thumb_delete(const char *file_or_lib_path, ThumbSize size)
#define PREVIEW_RENDER_LARGE_HEIGHT
void MEM_CacheLimiter_set_maximum(size_t m)
Read Guarded memory(de)allocation.
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
void UI_alert(bContext *C, blender::StringRef title, blender::StringRef message, eAlertIcon icon, bool compact)
uiBut * uiDefIconTextBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, std::optional< blender::StringRef > tip)
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss)
void UI_popup_block_invoke(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
const uiStyle * UI_style_get_dpi()
void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block)
bool UI_popup_block_name_exists(const bScreen *screen, blender::StringRef name)
void UI_fontstyle_set(const uiFontStyle *fs)
void UI_but_drawflag_disable(uiBut *but, int flag)
void UI_block_bounds_set_centered(uiBlock *block, int addval)
@ UI_BLOCK_THEME_STYLE_POPUP
uiBut * uiDefButBitC(uiBlock *block, ButType type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_flag_enable(uiBlock *block, int flag)
void UI_but_flag_enable(uiBut *but, int flag)
uiLayout * uiItemsAlertBox(uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size)
uiBut * uiItemL_ex(uiLayout *layout, blender::StringRef name, int icon, bool highlight, bool redalert)
void UI_view2d_zoom_cache_reset()
#define ND_ASSET_LIST_READING
void(*)(bContext *C, void *user_data) wmGenericCallbackFn
ATTR_WARN_UNUSED_RESULT const BMLoop * l
BPy_StructRNA * depsgraph
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
constexpr bool endswith(StringRef suffix) const
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void catalogs_set_save_catalogs_when_file_is_saved(bool should_save)
bool catalogs_get_save_catalogs_when_file_is_saved()
void pre_save_assets(Main *bmain)
void set_approximate_size_limit(int64_t limit_in_bytes)
constexpr int MAX_CHANNELS
VecBase< int32_t, 2 > int2
void ntreeCompositUpdateRLayers(bNodeTree *ntree)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
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)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
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)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
const char * RNA_property_identifier(const PropertyRNA *prop)
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_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int 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, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, 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, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
LinkNode * resynced_lib_overrides_libraries
double lib_overrides_recursive_resync
struct BlendFileReadReport::@077003321007012203371307366200326111253233132273 duration
int resynced_lib_overrides
bool pre_animato_file_loaded
int resynced_lib_overrides_libraries_count
struct BlendFileReadReport::@124362246150331065306145367225174223236260272332 count
int sequence_strips_skipped
int proxies_to_lib_overrides_failures
double lib_overrides_resync
int proxies_to_lib_overrides_success
const BlendThumbnail * thumb
eBLO_WritePathRemap remap_mode
bool is_missing_opencolorio_config
bool has_forward_compatibility_issues
BlendThumbnail * blen_thumb
MainColorspace colorspace
wmOperatorStatus(* run)(bContext *C, wmOperator *op)
void use_property_decorate_set(bool is_sep)
void scale_y_set(float scale)
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
uiLayout & split(float percentage, bool align)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
wmGenericUserDataFreeFn free_user_data
const char * app_template_override
unsigned int use_factory_settings_app_template_only
const char * filepath_startup_override
unsigned int use_factory_settings
unsigned int is_first_time
unsigned int use_empty_data
wmOperatorStatus(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
WindowManagerRuntimeHandle * runtime
struct wmEvent * eventstate
struct wmEvent * event_last_handled
void wm_close_and_free(bContext *C, wmWindowManager *wm)
void wm_clear_default_size(bContext *C)
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)
uint8_t * WM_window_pixels_read_from_frontbuffer(const wmWindowManager *wm, const wmWindow *win, int r_size[2])
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void wm_event_do_depsgraph(bContext *C, bool is_after_open_file)
void WM_main_add_notifier(uint type, void *reference)
void WM_report_banner_show(wmWindowManager *wm, wmWindow *win)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
wmOperatorStatus WM_operator_name_call_with_properties(bContext *C, const char *opstring, blender::wm::OpCallContext context, IDProperty *properties, const wmEvent *event)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
void WM_autosave_write(wmWindowManager *wm, Main *bmain)
static void free_post_file_close_action(void *arg)
void WM_file_autosave_init(wmWindowManager *wm)
bool WM_autosave_is_scheduled(wmWindowManager *wm)
bool WM_file_read(bContext *C, const char *filepath, const bool use_scripts_autoexec_check, ReportList *reports)
void wm_homefile_read(bContext *C, const wmHomeFileRead_Params *params_homefile, ReportList *reports)
void wm_autosave_timer_end(wmWindowManager *wm)
static void create_operator_state(wmOperatorType *ot, int first_state)
#define BKE_READ_EXOTIC_OK_BLEND
bool wm_operator_close_file_dialog_if_needed(bContext *C, wmOperator *op, wmGenericCallbackFn post_action_fn)
static void wm_init_userdef(Main *bmain)
static std::string wm_save_mainfile_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static wmOperatorStatus wm_recover_last_session_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool wm_save_mainfile_check(bContext *, wmOperator *op)
static wmOperatorStatus wm_open_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus wm_homefile_read_exec(bContext *C, wmOperator *op)
void wm_test_foreign_file_warning(bContext *C)
static uiBlock * block_create__close_file_dialog(bContext *C, ARegion *region, void *arg1)
static BlendFileReadWMSetupData * wm_file_read_setup_wm_init(bContext *C, Main *bmain, const bool is_read_homefile)
void WM_OT_read_history(wmOperatorType *ot)
static wmOperatorStatus wm_history_file_read_exec(bContext *, wmOperator *)
static void wm_open_mainfile_after_dialog_callback(bContext *C, void *user_data)
static bool wm_file_write_check_with_report_on_failure(Main *bmain, const char *filepath, ReportList *reports)
#define BKE_READ_EXOTIC_FAIL_FORMAT
void wm_test_autorun_revert_action_set(wmOperatorType *ot, PointerRNA *ptr)
#define BKE_READ_EXOTIC_FAIL_OPEN
static uiBlock * block_create_autorun_warning(bContext *C, ARegion *region, void *)
bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm)
static ImBuf * blend_file_thumb_from_screenshot(bContext *C, BlendThumbnail **r_thumb)
static bool wm_file_read_opwrap(bContext *C, const char *filepath, const bool use_scripts_autoexec_check, ReportList *reports)
void WM_OT_save_as_mainfile(wmOperatorType *ot)
void WM_OT_open_mainfile(wmOperatorType *ot)
void WM_file_tag_modified()
static wmOperatorStatus wm_recover_last_session_exec(bContext *C, wmOperator *op)
static void wm_block_file_close_cancel_button(uiBlock *block, wmGenericCallback *post_action)
static RecentFile * wm_file_history_find(const char *filepath)
const char * WM_init_state_app_template_get()
void wm_file_read_report(Main *bmain, wmWindow *win)
void wm_autosave_timer_begin(wmWindowManager *wm)
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)
static void wm_file_read_pre(bool use_data, bool)
static wmOperatorStatus wm_open_mainfile__select_file_path_exec(bContext *C, wmOperator *op)
static blender::int2 blend_file_thumb_clamp_size(const int size[2], const int limit)
static void wm_block_autorun_warning_enable_scripts(bContext *C, uiBlock *block)
static void save_file_overwrite_saveas(bContext *C, void *arg_block, void *)
static void wm_history_files_free()
static RecentFile * wm_history_file_new(const char *filepath)
static bool wm_revert_mainfile_poll(bContext *)
static void wm_read_callback_pre_wrapper(bContext *C, const char *filepath)
static wmOperatorStatus wm_recover_auto_save_invoke(bContext *C, wmOperator *op, const wmEvent *)
void wm_history_file_read()
void wm_autosave_delete()
static bool wm_open_mainfile_check(bContext *, wmOperator *op)
static ImBuf * blend_file_thumb_from_camera(const bContext *C, Scene *scene, bScreen *screen, BlendThumbnail **r_thumb)
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 wmOperatorStatus wm_open_mainfile__open(bContext *C, wmOperator *op)
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 save_file_overwrite_cancel_button(uiBlock *block, wmGenericCallback *post_action)
static void wm_block_file_close_save_button(uiBlock *block, wmGenericCallback *post_action, const bool needs_overwrite_confirm)
static wmOperatorStatus wm_userpref_read_invoke(bContext *C, wmOperator *op, const wmEvent *)
static struct @271061015143360014145002024272307131065165053366 wm_test_autorun_revert_action_data
void WM_OT_save_homefile(wmOperatorType *ot)
void WM_OT_read_factory_userpref(wmOperatorType *ot)
static void wm_file_read_setup_wm_finalize(bContext *C, Main *bmain, BlendFileReadWMSetupData *wm_setup_data)
static int get_operator_state(wmOperator *op)
static wmOperatorStatus wm_userpref_write_exec(bContext *C, wmOperator *op)
void WM_init_state_app_template_set(const char *app_template)
static void save_set_compress(wmOperator *op)
@ OPEN_MAINFILE_STATE_OPEN
@ OPEN_MAINFILE_STATE_DISCARD_CHANGES
@ OPEN_MAINFILE_STATE_SELECT_FILE_PATH
static wmOperatorStatus wm_revert_mainfile_exec(bContext *C, wmOperator *op)
static struct @151101107046063142034073030121153110227121110071 wm_init_state_app_template
void WM_OT_save_mainfile(wmOperatorType *ot)
void WM_OT_recover_auto_save(wmOperatorType *ot)
void wm_homefile_read_ex(bContext *C, const wmHomeFileRead_Params *params_homefile, ReportList *reports, wmFileReadPost_Params **r_params_file_read_post)
static std::string wm_save_as_mainfile_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static void wm_file_read_setup_wm_keep_old(const bContext *C, Main *bmain, BlendFileReadWMSetupData *wm_setup_data, wmWindowManager *wm, const bool load_ui)
static wmOperatorStatus wm_open_mainfile_exec(bContext *C, wmOperator *op)
static wmOperatorStatus wm_read_factory_settings_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void wm_block_file_close_discard(bContext *C, void *arg_block, void *arg_data)
void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *)
static void wm_history_file_write()
static void set_next_operator_state(wmOperator *op, int state)
void WM_file_autoexec_init(const char *filepath)
static wmOperatorStatus wm_recover_auto_save_exec(bContext *C, wmOperator *op)
void wm_homefile_read_post(bContext *C, const wmFileReadPost_Params *params_file_read_post)
static wmOperatorStatus wm_open_mainfile__discard_changes_exec(bContext *C, wmOperator *op)
static void wm_file_read_post(bContext *C, const char *filepath, const wmFileReadPost_Params *params)
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 wm_autosave_location(char filepath[FILE_MAX])
static wmOperatorStatus wm_clear_recent_files_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static std::string wm_open_mainfile_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static void save_catalogs_when_file_is_closed_set_fn(bContext *, void *arg1, void *)
static wmOperatorStatus operator_state_dispatch(bContext *C, wmOperator *op, OperatorDispatchTarget *targets)
static void wm_filepath_default(const Main *bmain, char *filepath)
void WM_OT_read_factory_settings(wmOperatorType *ot)
static wmOperatorStatus wm_homefile_write_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool wm_autosave_write_try(Main *bmain, wmWindowManager *wm)
static int wm_read_exotic(const char *filepath)
static void wm_block_autorun_warning_reload_with_scripts(bContext *C, uiBlock *block)
static wmOperatorStatus wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void file_overwrite_detailed_info_show(uiLayout *parent_layout, Main *bmain)
void wm_test_autorun_warning(bContext *C)
static void wm_block_file_close_cancel(bContext *C, void *arg_block, void *)
static wmOperatorStatus wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus wm_recover_last_session_impl(bContext *C, wmOperator *op, const bool use_scripts_autoexec_check)
static void wm_file_read_setup_wm_substitute_old_window(wmWindowManager *oldwm, wmWindowManager *wm, wmWindow *oldwin, wmWindow *win)
static wmOperatorStatus wm_userpref_read_exec(bContext *C, wmOperator *op)
void wm_open_init_load_ui(wmOperator *op, bool use_prefs)
static wmOperatorStatus wm_open_mainfile_dispatch(bContext *C, wmOperator *op)
static void read_factory_reset_props(wmOperatorType *ot)
static void wm_read_callback_post_wrapper(bContext *C, const char *filepath, const bool success)
static wmOperatorStatus wm_homefile_read_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void wm_clear_recent_files_ui(bContext *, wmOperator *op)
static void wm_block_autorun_warning_ignore(bContext *C, void *arg_block, void *)
static void wm_history_file_free(RecentFile *recent)
static void wm_autosave_timer_begin_ex(wmWindowManager *wm, double timestep)
static const EnumPropertyItem prop_clear_recent_types[]
static void save_file_overwrite_confirm_button(uiBlock *block, wmGenericCallback *post_action)
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 wmOperatorStatus wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
static uiBlock * block_create_save_file_overwrite_dialog(bContext *C, ARegion *region, void *arg1)
static void wm_file_read_setup_wm_use_new(bContext *C, Main *, BlendFileReadWMSetupData *wm_setup_data, wmWindowManager *wm)
void WM_OT_read_homefile(wmOperatorType *ot)
static std::string wm_save_as_mainfile_get_name(wmOperatorType *ot, PointerRNA *ptr)
static wmOperatorStatus wm_homefile_write_exec(bContext *C, wmOperator *op)
static uint8_t * blend_file_thumb_fast_downscale(const uint8_t *src_rect, const int src_size[2], const int dst_size[2])
static void wm_block_file_close_discard_button(uiBlock *block, wmGenericCallback *post_action)
static void wm_open_mainfile_ui(bContext *, wmOperator *op)
static void wm_history_file_update()
static wmOperatorStatus wm_revert_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void wm_gpu_backend_override_from_userdef()
void WM_OT_save_userpref(wmOperatorType *ot)
static void save_file_overwrite_confirm(bContext *C, void *arg_block, void *arg_data)
void WM_OT_clear_recent_files(wmOperatorType *ot)
bool WM_file_recover_last_session(bContext *C, const bool use_scripts_autoexec_check, ReportList *reports)
static void read_homefile_props(wmOperatorType *ot)
void wm_save_file_overwrite_dialog(bContext *C, wmOperator *op)
static const char * save_file_overwrite_dialog_name
static void save_file_overwrite_cancel(bContext *C, void *arg_block, void *)
static wmOperatorStatus wm_clear_recent_files_exec(bContext *, wmOperator *op)
static void save_file_overwrite_saveas_button(uiBlock *block, wmGenericCallback *post_action)
void WM_OT_revert_mainfile(wmOperatorType *ot)
void wm_close_file_dialog(bContext *C, wmGenericCallback *post_action)
bool wm_open_init_use_scripts(wmOperator *op, bool use_prefs)
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(wmMsgBus *mbus)
@ WM_MSG_STATICTYPE_FILE_READ
void WM_msg_publish_static(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)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operatortype_last_properties_clear_all()
wmOperatorStatus WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *)
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
wmOperatorStatus WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)
void WM_operator_properties_free(PointerRNA *ptr)
wmOperatorStatus WM_operator_props_popup_confirm_ex(bContext *C, wmOperator *op, const wmEvent *, std::optional< std::string > title, std::optional< std::string > confirm_text, const bool cancel_default, std::optional< std::string > message)
void WM_generic_callback_free(wmGenericCallback *callback)
wmGenericCallback * WM_generic_callback_steal(wmGenericCallback *callback)
void WM_init_input_devices()
WorkSpaceLayout * WM_window_get_active_layout(const wmWindow *win)
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
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)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
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_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
bScreen * WM_window_get_active_screen(const wmWindow *win)