|
Blender V5.0
|
#include "WM_types.hh"Go to the source code of this file.
Classes | |
| struct | wmHomeFileRead_Params |
| void wm_close_file_dialog | ( | bContext * | C, |
| wmGenericCallback * | post_action ) |
Definition at line 4894 of file wm_files.cc.
References block_create__close_file_dialog(), C, close_file_dialog_name, CTX_wm_screen(), free_post_file_close_action(), UI_popup_block_invoke(), UI_popup_block_name_exists(), and WM_generic_callback_free().
Referenced by wm_confirm_quit(), and wm_operator_close_file_dialog_if_needed().
| bool wm_file_or_session_data_has_unsaved_changes | ( | const Main * | bmain, |
| const wmWindowManager * | wm ) |
Check if there is data that would be lost when closing the current file without saving.
Definition at line 187 of file wm_files.cc.
References AS_asset_library_has_any_unsaved_catalogs(), ED_image_should_save_modified(), and wmWindowManager::file_saved.
Referenced by wm_operator_close_file_dialog_if_needed(), wm_quit_with_optional_confirmation_prompt(), and wm_read_factory_settings_invoke().
Definition at line 656 of file wm_files.cc.
References BKE_reportf(), BLI_findstring(), ListBase::first, G, LISTBASE_FOREACH, offsetof, R_engines, RPT_ERROR, Main::scenes, Main::wm, and WM_report_banner_show().
Referenced by wm_file_read_post().
| void wm_history_file_read | ( | ) |
Definition at line 1618 of file wm_files.cc.
References BKE_appdir_folder_id(), BLENDER_HISTORY_FILE, BLENDER_USER_CONFIG, BLI_addtail(), BLI_file_free_lines(), BLI_file_read_as_lines(), BLI_path_join, BLI_strdup(), FILE_MAX, RecentFile::filepath, G, l, MEM_mallocN(), num, U, and wm_history_files_free().
Referenced by wm_history_file_read_exec(), and WM_init().
| void wm_homefile_read | ( | bContext * | C, |
| const wmHomeFileRead_Params * | params_homefile, | ||
| ReportList * | reports ) |
Definition at line 1591 of file wm_files.cc.
References C, and wm_homefile_read_ex().
Referenced by wm_homefile_read_exec(), and wm_userpref_read_exec().
| void wm_homefile_read_ex | ( | bContext * | C, |
| const wmHomeFileRead_Params * | params_homefile, | ||
| ReportList * | reports, | ||
| wmFileReadPost_Params ** | r_params_file_read_post ) |
Called on startup, (context entirely filled with NULLs) or called for 'New File' both startup.blend and userpref.blend are checked.
| r_params_file_read_post | Support postponed initialization, needed for initial startup when only some sub-systems have been initialized. When non-null, wm_file_read_post doesn't run, instead it's arguments are stored in this return argument. The caller is responsible for calling wm_homefile_read_post with this return argument. |
Definition at line 1218 of file wm_files.cc.
References app_template, wmHomeFileRead_Params::app_template_override, BKE_appdir_app_template_id_search(), BKE_appdir_folder_id(), BKE_blender_userdef_app_template_data_set_and_free(), BKE_blender_userdef_data_set_and_free(), BKE_blendfile_read(), BKE_blendfile_read_from_memory(), BKE_blendfile_read_make_empty(), BKE_blendfile_read_setup_readfile(), BKE_blendfile_userdef_from_defaults(), BKE_blendfile_userdef_read(), BKE_reportf(), BLENDER_STARTUP_FILE, BLENDER_USER_CONFIG, BLENDER_USERPREF_FILE, BLI_access(), BLI_assert, BLI_exists(), BLI_path_join, BLO_READ_SKIP_DATA, BLO_READ_SKIP_USERDEF, BPY_run_string_eval(), C, CLOG_INFO, CTX_data_main(), CTX_py_init_get(), CTX_wm_window_set(), datatoc_startup_blend, datatoc_startup_blend_size, FILE_MAX, Main::filepath, wmHomeFileRead_Params::filepath_startup_override, G, G_FILE_NO_UI, G_FLAG_SCRIPT_AUTOEXEC, G_FLAG_SCRIPT_OVERRIDE_PREF, G_MAIN, wmFileReadPost_Params::is_alloc, BlendFileReadParams::is_factory_settings, BlendFileReadWMSetupData::is_factory_startup, wmFileReadPost_Params::is_factory_startup, wmFileReadPost_Params::is_first_time, wmHomeFileRead_Params::is_first_time, BlendFileReadParams::is_startup, wmFileReadPost_Params::is_startup_file, KEYCONF_INIT_DEFAULT, LISTBASE_FOREACH, LOG, MEM_mallocN(), params, BlendFileReadReport::reports, wmFileReadPost_Params::reset_app_template, RPT_ERROR, RPT_WARNING, SET_FLAG_FROM_TEST, BlendFileReadParams::skip_flags, STREQ, STRNCPY(), wmFileReadPost_Params::success, U, wmFileReadPost_Params::use_data, wmHomeFileRead_Params::use_data, wmHomeFileRead_Params::use_empty_data, wmHomeFileRead_Params::use_factory_settings, wmHomeFileRead_Params::use_factory_settings_app_template_only, wmFileReadPost_Params::use_userdef, wmHomeFileRead_Params::use_userdef, USER_SCRIPT_AUTOEXEC_DISABLE, Main::wm, WM_check(), wm_file_read_pre(), wm_file_read_setup_wm_finalize(), wm_file_read_setup_wm_init(), wm_homefile_read_post(), wm_init_userdef(), and wm_read_callback_pre_wrapper().
Referenced by wm_homefile_read(), and WM_init().
| void wm_homefile_read_post | ( | bContext * | C, |
| const wmFileReadPost_Params * | params_file_read_post ) |
Special case, support deferred execution of wm_file_read_post, Needed when loading for the first time to workaround order of initialization bug, see #89046.
Definition at line 1598 of file wm_files.cc.
References C, wmFileReadPost_Params::is_alloc, MEM_freeN(), wmFileReadPost_Params::success, wmFileReadPost_Params::use_data, wm_file_read_post(), and wm_read_callback_post_wrapper().
Referenced by wm_homefile_read_ex(), and WM_init().
| bool wm_operator_close_file_dialog_if_needed | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmGenericCallbackFn | post_action_fn ) |
Definition at line 4905 of file wm_files.cc.
References C, CTX_data_main(), CTX_wm_manager(), wmGenericCallback::exec, wmGenericCallback::free_user_data, IDP_CopyProperty(), MEM_callocN(), wmOperator::properties, U, wmGenericCallback::user_data, USER_SAVE_PROMPT, wm_close_file_dialog(), wm_file_or_session_data_has_unsaved_changes(), and wm_free_operator_properties_callback().
Referenced by wm_homefile_read_invoke(), wm_open_mainfile__discard_changes_exec(), and wm_recover_last_session_invoke().
| void WM_OT_append | ( | wmOperatorType * | ot | ) |
Definition at line 496 of file wm_files_link.cc.
References FILE_DEFAULTDISPLAY, FILE_LOADLIB, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_BLENDERLIB, FILE_TYPE_FOLDER, OPTYPE_UNDO, ot, RNA_def_boolean(), WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_SHOW_PROPS, wm_link_append_exec(), wm_link_append_invoke(), wm_link_append_poll(), wm_link_append_properties_common(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_clear_recent_files | ( | wmOperatorType * | ot | ) |
Definition at line 4045 of file wm_files.cc.
References CLEAR_RECENT_ALL, OPTYPE_REGISTER, ot, prop_clear_recent_types, RNA_def_enum(), wm_clear_recent_files_exec(), wm_clear_recent_files_invoke(), and wm_clear_recent_files_ui().
Referenced by wm_operatortypes_register().
| void WM_OT_id_linked_relocate | ( | wmOperatorType * | ot | ) |
Definition at line 676 of file wm_files_link.cc.
References FILE_DEFAULTDISPLAY, FILE_LOADLIB, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_BLENDERLIB, FILE_TYPE_FOLDER, MAIN_ID_SESSION_UID_UNSET, OPTYPE_INTERNAL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_int(), RNA_def_property_flag(), WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, WM_FILESEL_SHOW_PROPS, wm_id_linked_relocate_exec(), wm_link_append_invoke(), wm_link_append_poll(), wm_link_append_properties_common(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_lib_reload | ( | wmOperatorType * | ot | ) |
Definition at line 1075 of file wm_files_link.cc.
References FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, MAX_NAME, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_property_flag(), RNA_def_string(), WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, wm_lib_reload_exec(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_lib_relocate | ( | wmOperatorType * | ot | ) |
Definition at line 1044 of file wm_files_link.cc.
References FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, MAX_NAME, OPTYPE_UNDO, ot, PROP_HIDDEN, RNA_def_property_flag(), RNA_def_string(), WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, wm_lib_relocate_exec(), wm_lib_relocate_invoke(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_link | ( | wmOperatorType * | ot | ) |
Definition at line 472 of file wm_files_link.cc.
References FILE_DEFAULTDISPLAY, FILE_LOADLIB, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_BLENDERLIB, FILE_TYPE_FOLDER, OPTYPE_UNDO, ot, WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, WM_FILESEL_SHOW_PROPS, wm_link_append_exec(), wm_link_append_invoke(), wm_link_append_poll(), wm_link_append_properties_common(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_open_mainfile | ( | wmOperatorType * | ot | ) |
Definition at line 3373 of file wm_files.cc.
References create_operator_state(), FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, OPEN_MAINFILE_STATE_DISCARD_CHANGES, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_FILESEL_FILEPATH, wm_open_mainfile_check(), wm_open_mainfile_def_property_use_scripts(), wm_open_mainfile_exec(), wm_open_mainfile_get_description(), wm_open_mainfile_invoke(), wm_open_mainfile_ui(), and WM_operator_properties_filesel().
Referenced by wm_operatortypes_register().
| void WM_OT_read_factory_settings | ( | wmOperatorType * | ot | ) |
Definition at line 3064 of file wm_files.cc.
References ot, read_factory_reset_props(), read_homefile_props(), wm_homefile_read_exec(), and wm_read_factory_settings_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_read_factory_userpref | ( | wmOperatorType * | ot | ) |
Definition at line 2795 of file wm_files.cc.
References ot, read_factory_reset_props(), wm_userpref_read_exec(), and wm_userpref_read_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_read_history | ( | wmOperatorType * | ot | ) |
Definition at line 2822 of file wm_files.cc.
References OPTYPE_INTERNAL, ot, wm_history_file_read_exec(), and WM_operator_confirm().
Referenced by wm_operatortypes_register().
| void WM_OT_read_homefile | ( | wmOperatorType * | ot | ) |
Definition at line 2988 of file wm_files.cc.
References FILE_MAX, ot, PROP_HIDDEN, PROP_SKIP_SAVE, read_factory_reset_props(), read_homefile_props(), RNA_def_boolean(), RNA_def_property_flag(), RNA_def_string_file_path(), wm_homefile_read_exec(), and wm_homefile_read_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_read_userpref | ( | wmOperatorType * | ot | ) |
Definition at line 2756 of file wm_files.cc.
References ot, WM_operator_confirm(), and wm_userpref_read_exec().
Referenced by wm_operatortypes_register().
| void WM_OT_recover_auto_save | ( | wmOperatorType * | ot | ) |
Definition at line 3599 of file wm_files.cc.
References FILE_BLENDER, FILE_OPENFILE, FILE_SORT_TIME, FILE_TYPE_BLENDER, FILE_VERTICALDISPLAY, ot, WM_FILESEL_FILEPATH, wm_open_mainfile_def_property_use_scripts(), WM_operator_properties_filesel(), wm_recover_auto_save_exec(), and wm_recover_auto_save_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_recover_last_session | ( | wmOperatorType * | ot | ) |
Definition at line 3536 of file wm_files.cc.
References BLENDER_QUIT_FILE, ot, wm_open_mainfile_def_property_use_scripts(), wm_recover_last_session_exec(), and wm_recover_last_session_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_revert_mainfile | ( | wmOperatorType * | ot | ) |
Definition at line 3456 of file wm_files.cc.
References ot, wm_open_mainfile_def_property_use_scripts(), wm_revert_mainfile_exec(), wm_revert_mainfile_invoke(), and wm_revert_mainfile_poll().
Referenced by wm_operatortypes_register().
| void WM_OT_save_as_mainfile | ( | wmOperatorType * | ot | ) |
Definition at line 3862 of file wm_files.cc.
References FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_FILESEL_FILEPATH, WM_operator_properties_filesel(), wm_save_as_mainfile_exec(), wm_save_as_mainfile_get_description(), wm_save_as_mainfile_get_name(), wm_save_as_mainfile_invoke(), and wm_save_mainfile_check().
Referenced by wm_operatortypes_register().
| void WM_OT_save_homefile | ( | wmOperatorType * | ot | ) |
Definition at line 2600 of file wm_files.cc.
References ot, wm_homefile_write_exec(), and wm_homefile_write_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_save_mainfile | ( | wmOperatorType * | ot | ) |
Definition at line 3953 of file wm_files.cc.
References FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), WM_FILESEL_FILEPATH, WM_operator_properties_filesel(), wm_save_as_mainfile_exec(), wm_save_mainfile_check(), wm_save_mainfile_get_description(), and wm_save_mainfile_invoke().
Referenced by wm_operatortypes_register().
| void WM_OT_save_userpref | ( | wmOperatorType * | ot | ) |
Definition at line 2629 of file wm_files.cc.
References ot, WM_operator_confirm(), and wm_userpref_write_exec().
Referenced by wm_operatortypes_register().
| void WM_OT_set_working_color_space | ( | wmOperatorType * | ot | ) |
Definition at line 186 of file wm_files_colorspace.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_funcs(), rna_enum_dummy_NULL_items, wm_set_working_color_space_exec(), wm_set_working_color_space_invoke(), and working_space_itemf().
Referenced by wm_operatortypes_register().
| void wm_save_file_overwrite_dialog | ( | bContext * | C, |
| wmOperator * | op ) |
Confirmation dialog when user is about to save the current blend file, and it was previously created by a newer version of Blender.
Important to ask confirmation, as this is a very common scenario of data loss.
Definition at line 4574 of file wm_files.cc.
References block_create_save_file_overwrite_dialog(), C, CTX_wm_screen(), wmGenericCallback::exec, free_post_file_close_action(), wmGenericCallback::free_user_data, IDP_CopyProperty(), MEM_callocN(), wmOperator::properties, save_file_overwrite_dialog_name, UI_popup_block_invoke(), UI_popup_block_name_exists(), wmGenericCallback::user_data, and wm_free_operator_properties_callback().
Referenced by wm_save_mainfile_invoke().