23# define _WIN32_IE 0x0400
31#include <fmt/format.h>
48#include BLI_SYSTEM_PID_H
168#define USE_THUMBNAIL_FAST_DOWNSCALE
210 const bool is_read_homefile)
221 return wm_setup_data;
244 if (
wm->message_bus !=
nullptr) {
246 wm->message_bus =
nullptr;
268 return wm_setup_data;
284 wm->windrawable = win;
325 wm_setup_data->
old_wm =
nullptr;
338 if (screen !=
nullptr) {
347 if (screen->
winid == 0) {
357 bmain, workspace, layout_ref, win);
363 win_screen->
winid = win->winid;
390 wm->winactive =
nullptr;
395 bool has_match =
false;
398 if (old_win->winid == win->winid) {
413 wm_setup_data->
old_wm =
nullptr;
442 wm_setup_data->
old_wm ==
nullptr)
452 else if (wm_setup_data->
old_wm !=
nullptr) {
471 MEM_delete(wm_setup_data);
551#define BKE_READ_EXOTIC_FAIL_PATH -3
552#define BKE_READ_EXOTIC_FAIL_FORMAT -2
553#define BKE_READ_EXOTIC_FAIL_OPEN -1
554#define BKE_READ_EXOTIC_OK_BLEND 0
556# define BKE_READ_EXOTIC_OK_OTHER 1
573 int filepath_len = strlen(filepath);
574 if (filepath_len > 0 &&
ELEM(filepath[filepath_len - 1],
'/',
'\\')) {
585 if (rawfile ==
nullptr) {
591 if (rawfile->
read(rawfile, header,
sizeof(header)) !=
sizeof(header)) {
592 rawfile->
close(rawfile);
595 rawfile->
seek(rawfile, 0, SEEK_SET);
598 if (
STREQLEN(header,
"BLENDER", 7)) {
599 rawfile->
close(rawfile);
616 if (compressed_file !=
nullptr) {
617 size_t len = compressed_file->
read(compressed_file, header,
sizeof(header));
618 compressed_file->
close(compressed_file);
619 if (
len ==
sizeof(header) &&
STREQLEN(header,
"BLENDER", 7)) {
624 rawfile->
close(rawfile);
659 if (scene->r.engine[0] &&
664 "Engine '%s' not available for scene '%s' (an add-on may need to be installed "
720 const char *filepath,
725 const bool use_data =
params->use_data;
726 const bool use_userdef =
params->use_userdef;
727 const bool is_startup_file =
params->is_startup_file;
728 const bool is_factory_startup =
params->is_factory_startup;
729 const bool reset_app_template =
params->reset_app_template;
731 bool addons_loaded =
false;
742 if (is_startup_file) {
745 if (!
params->is_first_time) {
747 bool reset_all = use_userdef;
748 if (use_userdef || reset_app_template) {
751 const char *imports[] = {
"bl_app_template_utils",
nullptr};
757 const char *imports[] = {
"bpy",
"addon_utils",
nullptr};
765 "bpy.utils.refresh_script_paths()\n"
767 "addon_utils.reset_all()");
772 addons_loaded =
true;
780 addons_loaded =
true;
789 if (is_factory_startup) {
812 if (is_factory_startup) {
832 if (is_startup_file) {
858 if (
wm->undo_stack ==
nullptr) {
905 if (success ==
false) {
923 double duration_whole_minutes, duration_whole_seconds;
924 double duration_libraries_minutes, duration_libraries_seconds;
925 double duration_lib_override_minutes, duration_lib_override_seconds;
926 double duration_lib_override_resync_minutes, duration_lib_override_resync_seconds;
927 double duration_lib_override_recursive_resync_minutes,
928 duration_lib_override_recursive_resync_seconds;
933 &duration_whole_minutes,
934 &duration_whole_seconds,
939 &duration_libraries_minutes,
940 &duration_libraries_seconds,
945 &duration_lib_override_minutes,
946 &duration_lib_override_seconds,
951 &duration_lib_override_resync_minutes,
952 &duration_lib_override_resync_seconds,
957 &duration_lib_override_recursive_resync_minutes,
958 &duration_lib_override_recursive_resync_seconds,
962 &
LOG, 0,
"Blender file read in %.0fm%.2fs", duration_whole_minutes, duration_whole_seconds);
965 " * Loading libraries: %.0fm%.2fs",
966 duration_libraries_minutes,
967 duration_libraries_seconds);
970 " * Applying overrides: %.0fm%.2fs",
971 duration_lib_override_minutes,
972 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",
1047 const char *filepath,
1048 const bool use_scripts_autoexec_check,
1052 const bool do_history_file_update = (
G.background ==
false) &&
1054 bool success =
false;
1056 const bool use_data =
true;
1057 const bool use_userdef =
false;
1077 params.is_startup =
false;
1087 if (bfd !=
nullptr) {
1099 const int G_f_orig =
G.f;
1103 C, bfd, &
params, wm_setup_data, &bf_reports,
false,
nullptr);
1110 if (
G.f != G_f_orig) {
1113 G.f = (
G.f & ~flags_keep) | (G_f_orig & flags_keep);
1120 if (use_scripts_autoexec_check) {
1126 if (do_history_file_update) {
1131 read_file_post_params.
use_data = use_data;
1136 read_file_post_params.
success =
true;
1137 read_file_post_params.
is_alloc =
false;
1147 else if (retval == BKE_READ_EXOTIC_OK_OTHER) {
1148 BKE_undo_write(
C,
"Import file");
1154 "Cannot read file \"%s\": %s",
1156 errno ? strerror(errno) :
RPT_(
"unable to open the file"));
1231 bool success =
false;
1234 const bool use_data = params_homefile->
use_data;
1235 const bool use_userdef = params_homefile->
use_userdef;
1241 const bool use_factory_settings_app_template_only =
1247 bool filepath_startup_is_factory =
true;
1253 char app_template_system[
FILE_MAX];
1256 char app_template_config[
FILE_MAX];
1260 if (use_data ==
false) {
1263 if (use_userdef ==
false) {
1269 bool is_factory_startup =
true;
1272 bool update_defaults =
false;
1277 if (filepath_startup_override !=
nullptr) {
1280 else if (app_template_override) {
1284 else if (!use_factory_settings &&
U.app_template[0]) {
1288 const bool reset_app_template = ((!
app_template &&
U.app_template[0]) ||
1292 BLI_assert((use_factory_settings && filepath_startup_override) == 0);
1299 if (reset_app_template) {
1305 if (use_userdef || reset_app_template) {
1316 const char *imports[] = {
"addon_utils",
nullptr};
1340 filepath_startup[0] =
'\0';
1341 filepath_userdef[0] =
'\0';
1342 app_template_system[0] =
'\0';
1343 app_template_config[0] =
'\0';
1346 if (!use_factory_settings) {
1347 if (cfgdir.has_value()) {
1350 filepath_startup_is_factory =
false;
1357 use_factory_settings =
true;
1360 if (filepath_startup_override) {
1361 STRNCPY(filepath_startup, filepath_startup_override);
1362 filepath_startup_is_factory =
false;
1368 if (use_factory_settings_app_template_only) {
1372 else if (!use_factory_settings &&
BLI_exists(filepath_userdef)) {
1374 if (userdef !=
nullptr) {
1375 CLOG_INFO(&
LOG, 0,
"read prefs: \"%s\"", filepath_userdef);
1387 app_template, app_template_system,
sizeof(app_template_system)))
1397 if (!use_factory_settings && cfgdir.has_value()) {
1399 app_template_config,
sizeof(app_template_config), cfgdir->c_str(),
app_template);
1402 filepath_startup_is_factory =
false;
1403 if (
BLI_access(filepath_startup, R_OK) != 0) {
1404 filepath_startup[0] =
'\0';
1408 filepath_startup[0] =
'\0';
1411 if (filepath_startup[0] ==
'\0') {
1414 filepath_startup_is_factory =
true;
1417 update_defaults =
true;
1421 if (!use_factory_settings || (filepath_startup[0] !=
'\0')) {
1422 if (
BLI_access(filepath_startup, R_OK) == 0) {
1424 params.is_startup =
true;
1425 params.is_factory_settings = use_factory_settings;
1431 if (bfd !=
nullptr) {
1432 CLOG_INFO(&
LOG, 0,
"read startup: \"%s\"", filepath_startup);
1440 update_defaults && use_data,
1447 is_factory_startup = filepath_startup_is_factory;
1459 if (success ==
false && filepath_startup_override &&
reports) {
1464 bool loaded_factory_settings =
false;
1465 if (success ==
false) {
1472 if (bfd !=
nullptr) {
1476 C, bfd, &read_file_params, wm_setup_data, &read_report,
true,
nullptr);
1478 loaded_factory_settings =
true;
1483 if (use_empty_data) {
1490 if (app_template_system[0] !=
'\0') {
1492 temp_path[0] =
'\0';
1493 if (!use_factory_settings) {
1496 temp_path[0] =
'\0';
1500 if (temp_path[0] ==
'\0') {
1505 UserDef *userdef_template =
nullptr;
1509 if (userdef_template) {
1510 CLOG_INFO(&
LOG, 0,
"read prefs from app-template: \"%s\"", temp_path);
1513 if (userdef_template ==
nullptr) {
1517 if (userdef_template) {
1519 userdef_template =
nullptr;
1524 if (app_template_override) {
1525 STRNCPY(
U.app_template, app_template_override);
1544 if (
wm->defaultconf) {
1558 params_file_read_post.
use_data = use_data;
1566 params_file_read_post.
success = success;
1567 params_file_read_post.
is_alloc =
false;
1569 if (r_params_file_read_post ==
nullptr) {
1573 params_file_read_post.
is_alloc =
true;
1575 **r_params_file_read_post = params_file_read_post;
1592 const char *filepath =
"";
1595 if (params_file_read_post->
use_data) {
1599 if (params_file_read_post->
is_alloc) {
1613 if (!cfgdir.has_value()) {
1628 for (
l = lines,
num = 0;
l && (
num <
U.recent_files);
l =
l->next) {
1629 const char *line =
static_cast<const char *
>(
l->link);
1681 if (!user_config_dir.has_value()) {
1690 fprintf(fp,
"%s\n", recent->filepath);
1705 if (blendfile_path[0] ==
'\0') {
1709 recent =
static_cast<RecentFile *
>(
G.recent_files.first);
1721 recent = recent_next)
1723 recent_next = recent->
next;
1763#ifdef USE_THUMBNAIL_FAST_DOWNSCALE
1765 const int src_size[2],
1766 const int dst_size[2])
1783 BLI_assert(dst_size[0] <= src_size[0] && dst_size[1] <= src_size[1]);
1795 const uint32_t src_size_x = src_size[0];
1796 const uint32_t src_size_y = src_size[1];
1798 const uint32_t dst_size_x = dst_size[0];
1799 const uint32_t dst_size_y = dst_size[1];
1800 const uint8_t *src_px = src_rect;
1803 for (uint32_t dst_y = 0; dst_y < dst_size_y; dst_y++) {
1804 const uint32_t src_y_beg = src_y;
1805 const uint32_t src_y_end = ((dst_y + 1) * src_size_y) / dst_size_y;
1806 for (; src_y < src_y_end; src_y++) {
1807 uint32_t *accum = accum_row;
1809 for (uint32_t dst_x = 0; dst_x < dst_size_x; dst_x++, accum += 4) {
1810 const uint32_t src_x_end = ((dst_x + 1) * src_size_x) / dst_size_x;
1811 for (; src_x < src_x_end; src_x++) {
1812 accum[0] += uint32_t(src_px[0]);
1813 accum[1] += uint32_t(src_px[1]);
1814 accum[2] += uint32_t(src_px[2]);
1815 accum[3] += uint32_t(src_px[3]);
1820 BLI_assert(accum == accum_row + (4 * dst_size[0]));
1823 uint32_t *accum = accum_row;
1824 uint8_t *dst_px = dst_rect + ((dst_y * dst_size_x) * 4);
1825 uint32_t src_x_beg = 0;
1826 const uint32_t span_y = src_y_end - src_y_beg;
1827 for (uint32_t dst_x = 0; dst_x < dst_size_x; dst_x++) {
1828 const uint32_t src_x_end = ((dst_x + 1) * src_size_x) / dst_size_x;
1829 const uint32_t span_x = src_x_end - src_x_beg;
1831 const uint32_t sample_count = span_x * span_y;
1832 dst_px[0] = uint8_t(accum[0] / sample_count);
1833 dst_px[1] = uint8_t(accum[1] / sample_count);
1834 dst_px[2] = uint8_t(accum[2] / sample_count);
1835 dst_px[3] = uint8_t(accum[3] / sample_count);
1836 accum[0] = accum[1] = accum[2] = accum[3] = 0;
1840 src_x_beg = src_x_end;
1842 sample_count_all += sample_count;
1846 BLI_assert(src_px == src_rect + (
sizeof(uint8_t[4]) * src_size[0] * src_size[1]));
1847 BLI_assert(sample_count_all ==
size_t(src_size[0]) *
size_t(src_size[1]));
1876 if (
G.background || (win ==
nullptr)) {
1889 ImBuf *ibuf =
nullptr;
1895#ifdef USE_THUMBNAIL_FAST_DOWNSCALE
1896 if ((thumb_size_2x[0] <= win_size[0]) && (thumb_size_2x[1] <= win_size[1])) {
1928 char version_str[10];
1951 if (
G.background || scene ==
nullptr) {
1959 const float pixelsize_old =
U.pixelsize;
1961 char err_out[256] =
"unknown";
1968 if (screen !=
nullptr) {
1976 if (scene->
camera ==
nullptr && v3d ==
nullptr) {
1989 (v3d) ? &v3d->
shading :
nullptr,
2021 U.pixelsize = pixelsize_old;
2024 if (windrawable_old) {
2037 char version_str[10];
2055 CLOG_WARN(&
LOG,
"failed to create thumbnail: %s", err_out);
2079 printf(
"%s: \"%s\"\n", success ?
"written" :
"failed", filepath);
2088 const char *filepath,
2091 const int filepath_len = strlen(filepath);
2092 if (filepath_len == 0) {
2110 if (
BLI_path_cmp(li->runtime->filepath_abs, filepath) == 0) {
2123 const char *filepath,
2126 bool use_save_as_copy,
2131 ImBuf *ibuf_thumb =
nullptr;
2149 if (
const int st_mode =
BLI_exists(filepath)) {
2154 reports,
RPT_ERROR,
"Cannot save blend file, path \"%s\" is not writable", filepath);
2164 reports,
RPT_ERROR,
"Cannot save blend file, path \"%s\" is a directory", filepath);
2197 if (thumb !=
nullptr) {
2202 int file_preview_type =
U.file_preview_type;
2207 bool do_render = (scene !=
nullptr && scene->
camera !=
nullptr && screen !=
nullptr &&
2212 switch (file_preview_type) {
2243 blend_write_params.
thumb = thumb;
2248 const bool do_history_file_update = (
G.background ==
false) &&
2251 if (use_save_as_copy ==
false) {
2258 if (do_history_file_update) {
2275 if (thumb && thumb != main_thumb) {
2292 const int pid =
abs(getpid());
2293 char filename[1024];
2300 if (blendfile_path && (blendfile_path[0] !=
'\0')) {
2302 int len = strlen(basename) - 6;
2303 SNPRINTF(filename,
"%.*s_%d_autosave.blend",
len, basename, pid);
2306 SNPRINTF(filename,
"%d_autosave.blend", pid);
2337 return wm->autosave_scheduled;
2358 wm->autosave_scheduled =
false;
2377 if (
wm->autosavetimer) {
2379 wm->autosavetimer =
nullptr;
2406 wm->autosave_scheduled =
false;
2408 wm->autosave_scheduled =
true;
2447 "use_factory_startup_app_template_only",
2449 "Factory Startup App-Template Only",
2477 bool use_scripts_autoexec_check =
false;
2486 use_scripts_autoexec_check =
true;
2488 return use_scripts_autoexec_check;
2509 const char *
app_template =
U.app_template[0] ?
U.app_template :
nullptr;
2512 if (!cfgdir.has_value()) {
2533 printf(
"Writing homefile: \"%s\" ", filepath);
2550 bmain, filepath, fileflags, &blend_write_params, op->
reports);
2571 if (!
U.app_template[0]) {
2574 IFACE_(
"Overwrite Startup File"),
2575 IFACE_(
"Blender will start next time as it is now."),
2584 std::string message = fmt::format(
2585 fmt::runtime(
IFACE_(
"Template \"{}\" will start next time as it is now.")),
2589 IFACE_(
"Overwrite Template Startup File"),
2598 ot->name =
"Save Startup File";
2599 ot->idname =
"WM_OT_save_homefile";
2600 ot->description =
"Make the current file the default startup file";
2627 ot->name =
"Save Preferences";
2628 ot->idname =
"WM_OT_save_userpref";
2629 ot->description =
"Make the current preferences default";
2646#define USERDEF_RESTORE(member) \
2648 userdef_curr->member = userdef_prev->member; \
2655#undef USERDEF_RESTORE
2712 const bool use_data =
false;
2713 const bool use_userdef =
true;
2714 const bool use_factory_settings =
STREQ(op->
type->
idname,
"WM_OT_read_factory_userpref");
2715 const bool use_factory_settings_app_template_only =
2716 (use_factory_settings &&
RNA_boolean_get(op->
ptr,
"use_factory_startup_app_template_only"));
2720 UserDef U_backup = blender::dna::shallow_copy(
U);
2723 read_homefile_params.
use_data = use_data;
2727 use_factory_settings_app_template_only;
2738 if (use_factory_settings) {
2739 U.runtime.is_dirty =
true;
2754 ot->name =
"Load Preferences";
2755 ot->idname =
"WM_OT_read_userpref";
2756 ot->description =
"Load last saved preferences";
2768 const bool template_only =
U.app_template[0] &&
2771 if (template_only) {
2774 title = fmt::format(fmt::runtime(
IFACE_(
"Load Factory \"{}\" Preferences.")),
2778 title =
IFACE_(
"Load Factory Blender Preferences");
2785 IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\""),
2793 ot->name =
"Load Factory Preferences";
2794 ot->idname =
"WM_OT_read_factory_userpref";
2796 "Load factory default preferences. "
2797 "To make changes to preferences permanent, use \"Save Preferences\"";
2820 ot->name =
"Reload History File";
2821 ot->idname =
"WM_OT_read_history";
2822 ot->description =
"Reloads history and bookmarks";
2842 "WM_OT_read_factory_settings");
2843 const bool use_factory_settings = use_factory_startup_and_userdef ||
2845 const bool use_factory_settings_app_template_only =
2846 (use_factory_startup_and_userdef &&
2849 bool use_userdef =
false;
2851 const char *filepath =
nullptr;
2852 UserDef U_backup = blender::dna::shallow_copy(
U);
2854 if (!use_factory_settings) {
2864 filepath = filepath_buf;
2867 op->
reports,
RPT_ERROR,
"Can't read alternative start-up file: \"%s\"", filepath);
2873 if (use_factory_startup_and_userdef) {
2884 char app_template_buf[
sizeof(
U.app_template)];
2887 const bool use_splash = !use_factory_settings &&
RNA_boolean_get(op->
ptr,
"use_splash");
2894 if (!use_factory_settings) {
2913 read_homefile_params.
use_data =
true;
2917 use_factory_settings_app_template_only;
2931 if (use_factory_settings) {
2932 U.runtime.is_dirty =
true;
2967 prop =
RNA_def_string(
ot->srna,
"app_template",
"Template",
sizeof(
U.app_template),
"",
"");
2975 "After loading, remove everything except scenes, windows, and workspaces. This makes it "
2976 "possible to load the startup file with its scene configuration and window layout intact, "
2977 "but no objects, materials, animations, ...");
2984 ot->name =
"Reload Start-Up File";
2985 ot->idname =
"WM_OT_read_homefile";
2986 ot->description =
"Open the default file";
2996 "Path to an alternative start-up file");
3001 ot->srna,
"load_ui",
true,
"Load UI",
"Load user interface setup from the .blend file");
3012 "use_factory_startup",
3015 "Load the default ('factory startup') blend file. "
3016 "This is independent of the normal start-up file that the user can save");
3032 const bool template_only =
U.app_template[0] &&
3035 if (template_only) {
3038 title = fmt::format(fmt::runtime(
IFACE_(
"Load Factory \"{}\" Startup File and Preferences")),
3042 title =
IFACE_(
"Load Factory Default Startup File and Preferences");
3049 unsaved ?
IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\".\n"
3050 "Warning: Your file is unsaved! Proceeding will abandon your changes.") :
3051 IFACE_(
"To make changes to Preferences permanent, use \"Save Preferences\"."),
3059 ot->name =
"Load Factory Settings";
3060 ot->idname =
"WM_OT_read_factory_settings";
3062 "Load factory default startup file and preferences. "
3063 "To make changes permanent, use \"Save Startup File\" and \"Save Preferences\"";
3084 const char *filepath,
3085 const bool use_scripts_autoexec_check,
3127 for (
int i = 0; targets[
i].
run;
i++) {
3130 return target.
run(
C, op);
3188 if (
G.recent_files.first) {
3269 if (
BLI_stat(filepath, &stats) == -1) {
3270 return fmt::format(
"{}\n\n{}", filepath,
TIP_(
"File Not Found"));
3276 bool is_today, is_yesterday;
3278 nullptr,
int64_t(stats.st_mtime),
false, time_str, date_str, &is_today, &is_yesterday);
3279 if (is_today || is_yesterday) {
3287 return fmt::format(
"{}\n\n{}: {} {}\n{}: {}",
3306 bool is_untrusted =
false;
3315 *(lslash + 1) =
'\0';
3321 is_untrusted =
true;
3329 return is_untrusted;
3336 const char *autoexec_text;
3342 autoexec_text =
IFACE_(
"Trusted Source [Untrusted Path]");
3347 autoexec_text =
IFACE_(
"Trusted Source");
3359 "Allow .blend file to execute scripts automatically, default available from "
3360 "system preferences");
3366 ot->idname =
"WM_OT_open_mainfile";
3367 ot->description =
"Open a Blender file";
3385 ot->srna,
"load_ui",
true,
"Load UI",
"Load user interface setup in the .blend file");
3390 ot->srna,
"display_file_selector",
true,
"Display File Selector",
"");
3406 std::string message =
IFACE_(
"Any unsaved changes will be lost.");
3409 message +=
IFACE_(
"Warning: There are unsaved external image(s).");
3414 IFACE_(
"Revert to the Saved File"),
3443 return (blendfile_path[0] !=
'\0');
3448 ot->name =
"Revert";
3449 ot->idname =
"WM_OT_revert_mainfile";
3450 ot->description =
"Reload the saved file";
3466 const bool use_scripts_autoexec_check,
3479 const bool use_scripts_autoexec_check)
3483 if (!
G.background) {
3485 PointerRNA *props_ptr = MEM_new<PointerRNA>(__func__);
3525 ot->name =
"Recover Last Session";
3526 ot->idname =
"WM_OT_recover_last_session";
3559 if (!
G.background) {
3561 PointerRNA *props_ptr = MEM_new<PointerRNA>(__func__);
3588 ot->name =
"Recover Auto Save";
3589 ot->idname =
"WM_OT_recover_auto_save";
3590 ot->description =
"Open an automatically saved file to recover it";
3630 if (blendfile_path[0] !=
'\0') {
3649 if ((blendfile_path[0] ==
'\0') &&
G.recent_files.first) {
3654 STRNCPY(filepath, blendfile_path);
3711 if (is_filepath_set) {
3719 if (filepath[0] ==
'\0') {
3722 "Unable to save an unsaved file with an empty or unset \"filepath\" property");
3726 if ((is_save_as ==
false) && is_incremental) {
3731 if (
num == 0 && digits == 0) {
3736 const int tries_limit = 1000;
3744 }
while (in_use && tries < tries_limit &&
num < INT_MAX);
3751 const int fileflags_orig =
G.fileflags;
3752 int fileflags =
G.fileflags;
3758 C, filepath, fileflags, remap_mode, use_save_as_copy, op->
reports);
3764 G.fileflags = fileflags_orig;
3767 if (success ==
false) {
3773 if (is_incremental) {
3776 else if (is_save_as) {
3778 if (use_save_as_copy) {
3789 if (!use_save_as_copy) {
3802 wm->autosave_scheduled =
false;
3831 return CTX_IFACE_(
ot->translation_context,
"Save Copy");
3842 "Save the current file in the desired location but do not make the saved file active"));
3851 ot->name =
"Save As";
3852 ot->idname =
"WM_OT_save_as_mainfile";
3853 ot->description =
"Save the current file in the desired location";
3869 RNA_def_boolean(
ot->srna,
"compress",
false,
"Compress",
"Write compressed .blend file");
3874 "Remap relative paths when saving to a different directory");
3880 "Save a copy of the actual working state but does not make saved file active");
3909 if (blendfile_path[0] !=
'\0') {
3932 "Save the current Blender file with a numerically incremented name that does not "
3933 "overwrite any existing files");
3940 ot->name =
"Save Blender File";
3941 ot->idname =
"WM_OT_save_mainfile";
3942 ot->description =
"Save the current Blender file";
3958 RNA_def_boolean(
ot->srna,
"compress",
false,
"Compress",
"Write compressed .blend file");
3963 "Remap relative paths when saving to a different directory");
3965 prop =
RNA_def_boolean(
ot->srna,
"exit",
false,
"Exit",
"Exit Blender after saving");
3972 "Save the current Blender file with a numerically incremented name that "
3973 "does not overwrite any existing files");
3988 {0,
nullptr, 0,
nullptr,
nullptr},
3996 C, op, event,
IFACE_(
"Clear Recent Files List"),
IFACE_(
"Remove"));
4032 ot->name =
"Clear Recent Files List";
4033 ot->idname =
"WM_OT_clear_recent_files";
4034 ot->description =
"Clear the recent files list";
4110 const char *title =
RPT_(
4111 "For security reasons, automatic execution of Python scripts "
4112 "in this file was disabled:");
4113 const char *message =
RPT_(
"This may lead to unexpected behavior");
4114 const char *checkbox_text =
RPT_(
"Permanently allow execution of scripts");
4120 text_width = std::max(text_width,
4122 text_width = std::max(
4127 const int dialog_width = std::max(
int(400.0f *
UI_SCALE_FAC),
4137 col->label(message, ICON_NONE);
4142 layout->
prop(&pref_ptr,
"use_scripts_auto_execute",
UI_ITEM_NONE, checkbox_text, ICON_NONE);
4159 if ((blendfile_path[0] !=
'\0') &&
wm->file_saved) {
4164 IFACE_(
"Allow Execution"),
4172 TIP_(
"Reload file with execution of Python scripts enabled"));
4181 IFACE_(
"Allow Execution"),
4189 TIP_(
"Enable scripts"));
4208 TIP_(
"Continue using file without Python scripts"));
4249 if (
ot ==
nullptr) {
4251 ptr = MEM_new<PointerRNA>(__func__);
4321 char writer_ver_str[16];
4322 char current_ver_str[16];
4331 writer_ver_str,
sizeof(writer_ver_str), bmain->
versionfile, -1);
4336 char message_line1[256];
4337 char message_line2[256];
4339 RPT_(
"This file was saved by a newer version of Blender (%s)."),
4342 RPT_(
"Saving it with this Blender (%s) may cause loss of data."),
4344 layout->
label(message_line1, ICON_NONE);
4345 layout->
label(message_line2, ICON_NONE);
4353 layout->
label(
RPT_(
"This file is managed by the Blender asset system. It can only be"),
4355 layout->
label(
RPT_(
"saved as a new, regular file."), ICON_NONE);
4368 block,
UI_BTYPE_BUT, 0, ICON_NONE,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
nullptr, 0, 0,
"");
4387 PointerRNA *operator_propptr_p = &operator_propptr;
4461 RPT_(
"Cannot overwrite asset system files. Save as new file"),
4465 uiItemL_ex(layout,
RPT_(
"with an older Blender version?"), ICON_NONE,
true,
false);
4469 layout,
RPT_(
"Overwrite file with an older Blender version?"), ICON_NONE,
true,
false);
4474 RPT_(
"Cannot overwrite asset system files. Save as new file?"),
4486 if (blendfile_path[0] !=
'\0') {
4495 layout->
label(filename, ICON_NONE);
4507 split->column(
false);
4510 if (allow_overwrite) {
4516 split_right->
column(
false);
4519 split_right->
column(
false);
4522 split_right->
column(
false);
4533 callback->
exec =
nullptr;
4575 bool execute_callback =
true;
4588 execute_callback =
false;
4594 if (file_has_been_saved_before) {
4603 execute_callback =
false;
4609 execute_callback =
false;
4615 execute_callback =
false;
4618 if (execute_callback) {
4627 block,
UI_BTYPE_BUT, 0, ICON_NONE,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
nullptr, 0, 0,
"");
4653 const bool needs_overwrite_confirm)
4661 needs_overwrite_confirm ?
IFACE_(
"Save As...") :
IFACE_(
"Save"),
4679 char *save_catalogs_when_file_is_closed =
static_cast<char *
>(arg1);
4681 *save_catalogs_when_file_is_closed != 0);
4701 uiItemL_ex(layout,
RPT_(
"Save changes before closing?"), ICON_NONE,
true,
false);
4706 if (blendfile_path[0] !=
'\0') {
4712 layout->
label(filename, ICON_NONE);
4715 if (needs_overwrite_confirm) {
4732 char *message =
BLI_strdupn(report->message, report->len);
4733 char *path_info = strstr(message,
": ");
4736 path_info[1] =
'\0';
4740 uiItemL_ex(row, message, ICON_NONE,
false,
true);
4742 uiItemL_ex(row, path_info, ICON_NONE,
false,
true);
4748 bool has_extra_checkboxes =
false;
4751 if (modified_images_count > 0) {
4753 SNPRINTF(message,
"Save %u modified image(s)", modified_images_count);
4755 if (!has_extra_checkboxes) {
4771 has_extra_checkboxes =
true;
4775 static char save_catalogs_when_file_is_closed;
4780 if (!has_extra_checkboxes) {
4787 "Save modified asset catalogs",
4792 &save_catalogs_when_file_is_closed,
4798 &save_catalogs_when_file_is_closed,
4800 has_extra_checkboxes =
true;
4809 const bool windows_layout =
true;
4811 const bool windows_layout =
false;
4814 if (windows_layout) {
4820 split->column(
false);
4823 split->column(
false);
4826 split->column(
false);
4835 split->column(
false);
4840 split_right->
column(
false);
4843 split_right->
column(
false);
4846 split_right->
column(
false);
4873 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)
bool CTX_py_init_get(bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
wmWindow * CTX_wm_window(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_BACKGROUND_NO_DEPSGRAPH
@ 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
#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)
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(clg_ref, level,...)
@ 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, bool use_camera_view_bounds, 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()
bool GPU_backend_type_selection_detect()
void GPU_backend_type_selection_set_override(eGPUBackendType backend_type)
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)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, 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)
uiBut * uiDefButBitC(uiBlock *block, int 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)
@ UI_BLOCK_THEME_STYLE_POPUP
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)
void UI_block_flag_enable(uiBlock *block, int flag)
void UI_but_flag_enable(uiBut *but, int flag)
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiItemsAlertBox(uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
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)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
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
struct BlendFileReadReport::@142320212234231245113115306176140270124216310033 duration
double lib_overrides_recursive_resync
int resynced_lib_overrides
struct BlendFileReadReport::@322005145130211163057315230271062050320025262277 count
int resynced_lib_overrides_libraries_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 has_forward_compatibility_issues
BlendThumbnail * blen_thumb
wmOperatorStatus(* run)(bContext *C, wmOperator *op)
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 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
struct wmKeyConfig * defaultconf
struct wmKeyConfig * userconf
struct wmWindow * windrawable
struct wmKeyConfig * addonconf
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])
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)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
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_with_properties(bContext *C, const char *opstring, wmOperatorCallContext context, IDProperty *properties, const wmEvent *event)
void WM_event_remove_handlers(bContext *C, ListBase *handlers)
static struct @065355016347034316223361120114104026105157201273 wm_test_autorun_revert_action_data
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)
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 *)
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)
static wmOperatorStatus wm_revert_mainfile_exec(bContext *C, wmOperator *op)
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)
static struct @242156356073304241142344134225003355320250223123 wm_init_state_app_template
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)
@ OPEN_MAINFILE_STATE_OPEN
@ OPEN_MAINFILE_STATE_DISCARD_CHANGES
@ OPEN_MAINFILE_STATE_SELECT_FILE_PATH
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_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)
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)
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)