Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | |||||
| #include "ED_undo.h" | #include "ED_undo.h" | ||||
| #include "ED_util.h" | #include "ED_util.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "ED_view3d_offscreen.h" | #include "ED_view3d_offscreen.h" | ||||
| #include "GHOST_C-api.h" | #include "GHOST_C-api.h" | ||||
| #include "GHOST_Path-api.h" | #include "GHOST_Path-api.h" | ||||
| #include "GPU_context.h" | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| /* only to report a missing engine */ | /* only to report a missing engine */ | ||||
| #include "RE_engine.h" | #include "RE_engine.h" | ||||
| #ifdef WITH_PYTHON | #ifdef WITH_PYTHON | ||||
| ▲ Show 20 Lines • Show All 319 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Preferences Initialization & Versioning | /** \name Preferences Initialization & Versioning | ||||
| * \{ */ | * \{ */ | ||||
| static void wm_gpu_backend_override_from_userdef(void) | |||||
| { | |||||
| /* Check if GPU backend is already set from the command line arguments. The command line | |||||
| * arguments have higher priority than user preferences. */ | |||||
| if (GPU_backend_type_selection_is_overridden()) { | |||||
| return; | |||||
| } | |||||
| GPU_backend_type_selection_set_override(U.gpu_backend); | |||||
| } | |||||
| /** | /** | ||||
| * In case #UserDef was read, re-initialize values that depend on it. | * In case #UserDef was read, re-initialize values that depend on it. | ||||
| */ | */ | ||||
| static void wm_init_userdef(Main *bmain) | static void wm_init_userdef(Main *bmain) | ||||
| { | { | ||||
| /* Not versioning, just avoid errors. */ | /* Not versioning, just avoid errors. */ | ||||
| #ifndef WITH_CYCLES | #ifndef WITH_CYCLES | ||||
| BKE_addon_remove_safe(&U.addons, "cycles"); | BKE_addon_remove_safe(&U.addons, "cycles"); | ||||
| Show All 17 Lines | #endif | ||||
| /* Update the temporary directory from the preferences or fallback to the system default. */ | /* Update the temporary directory from the preferences or fallback to the system default. */ | ||||
| BKE_tempdir_init(U.tempdir); | BKE_tempdir_init(U.tempdir); | ||||
| /* Update input device preference. */ | /* Update input device preference. */ | ||||
| WM_init_input_devices(); | WM_init_input_devices(); | ||||
| BLO_sanitize_experimental_features_userpref_blend(&U); | BLO_sanitize_experimental_features_userpref_blend(&U); | ||||
| wm_gpu_backend_override_from_userdef(); | |||||
| GPU_backend_type_selection_detect(); | |||||
| } | } | ||||
| /* return codes */ | /* return codes */ | ||||
| #define BKE_READ_EXOTIC_FAIL_PATH -3 /* file format is not supported */ | #define BKE_READ_EXOTIC_FAIL_PATH -3 /* file format is not supported */ | ||||
| #define BKE_READ_EXOTIC_FAIL_FORMAT -2 /* file format is not supported */ | #define BKE_READ_EXOTIC_FAIL_FORMAT -2 /* file format is not supported */ | ||||
| #define BKE_READ_EXOTIC_FAIL_OPEN -1 /* Can't open the file */ | #define BKE_READ_EXOTIC_FAIL_OPEN -1 /* Can't open the file */ | ||||
| #define BKE_READ_EXOTIC_OK_BLEND 0 /* .blend file */ | #define BKE_READ_EXOTIC_OK_BLEND 0 /* .blend file */ | ||||
| #if 0 | #if 0 | ||||
| ▲ Show 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | BKE_reportf(bf_reports->reports, | ||||
| "please check the Info editor for details", | "please check the Info editor for details", | ||||
| bf_reports->resynced_lib_overrides_libraries_count, | bf_reports->resynced_lib_overrides_libraries_count, | ||||
| duration_lib_override_recursive_resync_minutes, | duration_lib_override_recursive_resync_minutes, | ||||
| duration_lib_override_recursive_resync_seconds); | duration_lib_override_recursive_resync_seconds); | ||||
| } | } | ||||
| if (bf_reports->count.proxies_to_lib_overrides_success != 0 || | if (bf_reports->count.proxies_to_lib_overrides_success != 0 || | ||||
| bf_reports->count.proxies_to_lib_overrides_failures != 0) { | bf_reports->count.proxies_to_lib_overrides_failures != 0) { | ||||
| BKE_reportf( | BKE_reportf(bf_reports->reports, | ||||
| bf_reports->reports, | |||||
| RPT_WARNING, | RPT_WARNING, | ||||
| "Proxies have been removed from Blender (%d proxies were automatically converted " | "Proxies have been removed from Blender (%d proxies were automatically converted " | ||||
| "to library overrides, %d proxies could not be converted and were cleared). " | "to library overrides, %d proxies could not be converted and were cleared). " | ||||
| "Consider re-saving any library .blend file with the newest Blender version", | "Consider re-saving any library .blend file with the newest Blender version", | ||||
| bf_reports->count.proxies_to_lib_overrides_success, | bf_reports->count.proxies_to_lib_overrides_success, | ||||
| bf_reports->count.proxies_to_lib_overrides_failures); | bf_reports->count.proxies_to_lib_overrides_failures); | ||||
| } | } | ||||
| if (bf_reports->count.sequence_strips_skipped != 0) { | if (bf_reports->count.sequence_strips_skipped != 0) { | ||||
| BKE_reportf(bf_reports->reports, | BKE_reportf(bf_reports->reports, | ||||
| RPT_ERROR, | RPT_ERROR, | ||||
| "%d sequence strips were not read because they were in a channel larger than %d", | "%d sequence strips were not read because they were in a channel larger than %d", | ||||
| bf_reports->count.sequence_strips_skipped, | bf_reports->count.sequence_strips_skipped, | ||||
| MAXSEQ); | MAXSEQ); | ||||
| ▲ Show 20 Lines • Show All 2,969 Lines • Show Last 20 Lines | |||||