Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "AS_asset_library.h" | |||||
| #include "BKE_addon.h" | #include "BKE_addon.h" | ||||
| #include "BKE_appdir.h" | #include "BKE_appdir.h" | ||||
| #include "BKE_asset_library.h" | |||||
| #include "BKE_autoexec.h" | #include "BKE_autoexec.h" | ||||
| #include "BKE_blender.h" | #include "BKE_blender.h" | ||||
| #include "BKE_blendfile.h" | #include "BKE_blendfile.h" | ||||
| #include "BKE_callbacks.h" | #include "BKE_callbacks.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | if (wm->file_saved) { | ||||
| /* notifier that data changed, for save-over warning or header */ | /* notifier that data changed, for save-over warning or header */ | ||||
| WM_main_add_notifier(NC_WM | ND_DATACHANGED, NULL); | WM_main_add_notifier(NC_WM | ND_DATACHANGED, NULL); | ||||
| } | } | ||||
| } | } | ||||
| bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm) | bool wm_file_or_session_data_has_unsaved_changes(const Main *bmain, const wmWindowManager *wm) | ||||
| { | { | ||||
| return !wm->file_saved || ED_image_should_save_modified(bmain) || | return !wm->file_saved || ED_image_should_save_modified(bmain) || | ||||
| BKE_asset_library_has_any_unsaved_catalogs(); | AS_asset_library_has_any_unsaved_catalogs(); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Window Matching for File Reading | /** \name Window Matching for File Reading | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 3,570 Lines • ▼ Show 20 Lines | uiDefButBitC(block, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| ""); | ""); | ||||
| has_extra_checkboxes = true; | has_extra_checkboxes = true; | ||||
| } | } | ||||
| if (BKE_asset_library_has_any_unsaved_catalogs()) { | if (AS_asset_library_has_any_unsaved_catalogs()) { | ||||
| static char save_catalogs_when_file_is_closed; | static char save_catalogs_when_file_is_closed; | ||||
| save_catalogs_when_file_is_closed = ED_asset_catalogs_get_save_catalogs_when_file_is_saved(); | save_catalogs_when_file_is_closed = ED_asset_catalogs_get_save_catalogs_when_file_is_saved(); | ||||
| /* Only the first checkbox should get extra separation. */ | /* Only the first checkbox should get extra separation. */ | ||||
| if (!has_extra_checkboxes) { | if (!has_extra_checkboxes) { | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines | |||||