|
Blender V4.3
|
#include <cstring>#include <fmt/format.h>#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "BLI_listbase.h"#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BKE_callbacks.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_main.hh"#include "BKE_preferences.h"#include "BKE_report.hh"#include "BLT_translation.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_prototypes.hh"#include "RNA_types.hh"#include "UI_interface.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_asset.hh"#include "ED_userpref.hh"#include "MEM_guardedalloc.h"Go to the source code of this file.
Add Extension Repository Operator | |
| enum class | bUserExtensionRepoAddType { Remote = 0 , Local = 1 } |
| static const char * | preferences_extension_repo_default_name_from_type (const bUserExtensionRepoAddType repo_type) |
| static int | preferences_extension_repo_add_exec (bContext *C, wmOperator *op) |
| static int | preferences_extension_repo_add_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | preferences_extension_repo_add_ui (bContext *, wmOperator *op) |
| static void | PREFERENCES_OT_extension_repo_add (wmOperatorType *ot) |
|
strong |
| Enumerator | |
|---|---|
| Remote | |
| Local | |
Definition at line 252 of file userpref_ops.cc.
|
static |
Definition at line 855 of file userpref_ops.cc.
References result, and WM_platform_associate_set().
Referenced by associate_blend_exec(), and unassociate_blend_exec().
|
static |
Definition at line 872 of file userpref_ops.cc.
References associate_blend(), BKE_report(), BLI_assert, BLI_assert_unreachable, BLI_windows_is_store_install(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_INFO, UNUSED_VARS, USER_REGISTER_ALL_USERS, and WM_cursor_wait().
Referenced by PREFERENCES_OT_associate_blend().
|
static |
Definition at line 837 of file userpref_ops.cc.
References BLI_windows_is_store_install(), CTX_wm_operator_poll_msg_set(), and UNUSED_VARS.
Referenced by PREFERENCES_OT_associate_blend(), and PREFERENCES_OT_unassociate_blend().
Definition at line 1057 of file userpref_ops.cc.
References wmDropBox::ptr, RNA_string_set(), and WM_drag_get_single_path().
Referenced by ED_dropbox_drop_extension().
Definition at line 1042 of file userpref_ops.cc.
References BLI_path_extension(), STRCASEEQ, wmDrag::type, WM_drag_get_single_path(), and WM_DRAG_PATH.
Referenced by ED_dropbox_drop_extension().
Definition at line 1029 of file userpref_ops.cc.
References wmDropBox::ptr, RNA_string_set(), str, and WM_drag_get_string().
Referenced by ED_dropbox_drop_extension().
Definition at line 975 of file userpref_ops.cc.
References BKE_preferences_extension_repo_find_by_remote_url_prefix(), BKE_preferences_extension_repo_remote_scheme_end(), BLI_path_extension(), str, STRCASEEQ, wmDrag::type, WM_drag_get_string(), and WM_DRAG_STRING.
Referenced by ED_dropbox_drop_extension().
|
static |
Definition at line 1066 of file userpref_ops.cc.
References drop_extension_path_copy(), drop_extension_path_poll(), drop_extension_url_copy(), drop_extension_url_poll(), RGN_TYPE_WINDOW, SPACE_EMPTY, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_operatortypes_userpref().
| void ED_operatortypes_userpref | ( | ) |
Definition at line 1083 of file userpref_ops.cc.
References ED_dropbox_drop_extension(), PREFERENCES_OT_asset_library_add(), PREFERENCES_OT_asset_library_remove(), PREFERENCES_OT_associate_blend(), PREFERENCES_OT_autoexec_path_add(), PREFERENCES_OT_autoexec_path_remove(), PREFERENCES_OT_extension_repo_add(), PREFERENCES_OT_extension_repo_remove(), PREFERENCES_OT_extension_url_drop(), PREFERENCES_OT_reset_default_theme(), PREFERENCES_OT_unassociate_blend(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
|
static |
Definition at line 140 of file userpref_ops.cc.
References BKE_preferences_asset_library_add(), BLI_findindex(), BLI_path_slash_rstrip(), BLI_path_split_file_part(), blender::ed::asset::list::clear_all_library(), dirname(), FILE_MAXFILE, MEM_freeN(), NC_WINDOW, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), and WM_main_add_notifier().
Referenced by preferences_asset_library_add_invoke(), and PREFERENCES_OT_asset_library_add().
|
static |
Definition at line 162 of file userpref_ops.cc.
References OPERATOR_RUNNING_MODAL, preferences_asset_library_add_exec(), wmOperator::ptr, RNA_struct_property_is_set(), and WM_event_add_fileselect().
Referenced by PREFERENCES_OT_asset_library_add().
|
static |
Definition at line 209 of file userpref_ops.cc.
References BKE_preferences_asset_library_remove(), BLI_findlink(), BLI_listbase_count(), CLAMP, blender::ed::asset::list::clear_all_library(), NC_SPACE, ND_SPACE_ASSET_PARAMS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), and WM_main_add_notifier().
Referenced by PREFERENCES_OT_asset_library_remove().
|
static |
Definition at line 200 of file userpref_ops.cc.
References BLI_listbase_is_empty(), and CTX_wm_operator_poll_msg_set().
Referenced by PREFERENCES_OT_asset_library_remove().
|
static |
Definition at line 84 of file userpref_ops.cc.
References BLI_addtail(), MEM_callocN, and OPERATOR_FINISHED.
Referenced by PREFERENCES_OT_autoexec_path_add().
|
static |
Definition at line 110 of file userpref_ops.cc.
References BLI_findlink(), BLI_freelinkN(), OPERATOR_FINISHED, wmOperator::ptr, and RNA_int_get().
Referenced by PREFERENCES_OT_autoexec_path_remove().
|
static |
Definition at line 272 of file userpref_ops.cc.
References bUserExtensionRepo::access_token, ARRAY_SIZE, BKE_callback_exec(), BKE_callback_exec_null(), BKE_CB_EVT_EXTENSION_REPOS_SYNC, BKE_CB_EVT_EXTENSION_REPOS_UPDATE_POST, BKE_CB_EVT_EXTENSION_REPOS_UPDATE_PRE, BKE_preferences_extension_remote_to_name(), BKE_preferences_extension_repo_add(), BKE_reportf(), BLI_findindex(), BLI_path_basename(), BLI_path_slash_rstrip(), CTX_data_main(), bUserExtensionRepo::custom_dirpath, ELEM, FILE_MAX, bUserExtensionRepo::flag, Local, module, bUserExtensionRepo::name, NC_WINDOW, OPERATOR_FINISHED, preferences_extension_repo_default_name_from_type(), wmOperator::ptr, Remote, bUserExtensionRepo::remote_url, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_create(), RNA_property_is_set(), RNA_property_string_get(), RNA_string_get(), RNA_string_get_alloc(), RNA_string_length(), RNA_struct_find_property(), RPT_INFO, STRNCPY, STRNCPY_UTF8, USER_EXTENSION_REPO_FLAG_SYNC_ON_STARTUP, USER_EXTENSION_REPO_FLAG_USE_ACCESS_TOKEN, USER_EXTENSION_REPO_FLAG_USE_CUSTOM_DIRECTORY, USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL, and WM_event_add_notifier().
Referenced by PREFERENCES_OT_extension_repo_add().
|
static |
Definition at line 403 of file userpref_ops.cc.
References IFACE_, preferences_extension_repo_default_name_from_type(), wmOperator::ptr, Remote, RNA_enum_get(), RNA_property_is_set(), RNA_property_string_set(), RNA_struct_find_property(), and WM_operator_props_popup_confirm_ex().
Referenced by PREFERENCES_OT_extension_repo_add().
|
static |
Definition at line 421 of file userpref_ops.cc.
References col, IFACE_, wmOperator::layout, Line, Local, ptr, wmOperator::ptr, Remote, RNA_boolean_get(), RNA_enum_get(), RNA_string_length(), UI_ITEM_NONE, UI_ITEM_R_IMMEDIATE, uiItemR(), uiItemS_ex(), uiLayoutRow(), uiLayoutRowWithHeading(), uiLayoutSetActive(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by PREFERENCES_OT_extension_repo_add().
|
static |
Definition at line 257 of file userpref_ops.cc.
References BLI_assert_unreachable, Local, and Remote.
Referenced by preferences_extension_repo_add_exec(), and preferences_extension_repo_add_invoke().
|
static |
Definition at line 662 of file userpref_ops.cc.
References BKE_callback_exec_null(), BKE_callback_exec_string(), BKE_CB_EVT_EXTENSION_REPOS_FILES_CLEAR, BKE_CB_EVT_EXTENSION_REPOS_UPDATE_POST, BKE_CB_EVT_EXTENSION_REPOS_UPDATE_PRE, BKE_preferences_extension_repo_dirpath_get(), BKE_preferences_extension_repo_module_is_valid(), BKE_preferences_extension_repo_remove(), BKE_preferences_extension_repo_user_dirpath_get(), BKE_report(), BKE_reportf(), BLI_delete(), BLI_findlink(), BLI_is_dir(), BLI_listbase_count(), CLAMP, CTX_data_main(), FILE_MAX, bUserExtensionRepo::flag, bUserExtensionRepo::module, NC_WINDOW, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_int_get(), RPT_WARNING, bUserExtensionRepo::source, USER_EXTENSION_REPO_FLAG_USE_CUSTOM_DIRECTORY, USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL, USER_EXTENSION_REPO_SOURCE_SYSTEM, and WM_event_add_notifier().
Referenced by PREFERENCES_OT_extension_repo_remove().
|
static |
Definition at line 608 of file userpref_ops.cc.
References ALERT_ICON_WARNING, ARRAY_SIZE, BKE_preferences_extension_repo_dirpath_get(), BKE_preferences_extension_repo_user_dirpath_get(), BLI_findlink(), FILE_MAX, bUserExtensionRepo::flag, IFACE_, OPERATOR_CANCELLED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), bUserExtensionRepo::source, USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL, USER_EXTENSION_REPO_SOURCE_SYSTEM, and WM_operator_confirm_ex().
Referenced by PREFERENCES_OT_extension_repo_remove().
|
static |
Definition at line 599 of file userpref_ops.cc.
References BLI_listbase_is_empty(), and CTX_wm_operator_poll_msg_set().
Referenced by PREFERENCES_OT_extension_repo_remove().
|
static |
Definition at line 780 of file userpref_ops.cc.
References BKE_reportf(), G, G_FLAG_INTERNET_ALLOW, MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, ot, wmOperator::ptr, wmOperator::reports, RNA_string_get_alloc(), RNA_string_set(), RPT_ERROR, STRPREFIX, WM_OP_INVOKE_DEFAULT, WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operatortype_find().
Referenced by PREFERENCES_OT_extension_url_drop().
|
static |
Definition at line 174 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, ot, preferences_asset_library_add_exec(), preferences_asset_library_add_invoke(), WM_FILESEL_DIRECTORY, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 231 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_INTERNAL, ot, wmOperatorType::poll, preferences_asset_library_remove_exec(), preferences_asset_library_remove_poll(), RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 909 of file userpref_ops.cc.
References associate_blend_exec(), associate_blend_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 93 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_INTERNAL, ot, and preferences_autoexec_add_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 121 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_INTERNAL, ot, preferences_autoexec_remove_exec(), RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 466 of file userpref_ops.cc.
References bUserExtensionRepo::custom_dirpath, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, int, wmOperatorType::invoke, Local, bUserExtensionRepo::name, wmOperatorType::name, OPTYPE_INTERNAL, OPTYPE_REGISTER, ot, preferences_extension_repo_add_exec(), preferences_extension_repo_add_invoke(), preferences_extension_repo_add_ui(), wmOperatorType::prop, PROP_HIDDEN, PROP_PASSWORD, PROP_SKIP_SAVE, Remote, bUserExtensionRepo::remote_url, RNA_def_boolean(), RNA_def_enum(), RNA_def_property_flag(), RNA_def_property_subtype(), RNA_def_string(), RNA_def_string_dir_path(), RNA_property_ui_description_raw(), RNA_property_ui_name_raw(), RNA_struct_type_find_property(), wmOperatorType::srna, and wmOperatorType::ui.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 751 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, ot, wmOperatorType::poll, preferences_extension_repo_remove_exec(), preferences_extension_repo_remove_invoke(), preferences_extension_repo_remove_poll(), PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 818 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, preferences_extension_url_drop_invoke(), RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 64 of file userpref_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, ot, and preferences_reset_default_theme_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 957 of file userpref_ops.cc.
References associate_blend_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and unassociate_blend_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 53 of file userpref_ops.cc.
References CTX_data_main(), NC_WINDOW, OPERATOR_FINISHED, UI_style_init_default(), UI_theme_init_default(), WM_event_add_notifier(), and WM_reinit_gizmomap_all().
Referenced by PREFERENCES_OT_reset_default_theme().
|
static |
Definition at line 921 of file userpref_ops.cc.
References associate_blend(), BKE_report(), BLI_assert, BLI_assert_unreachable, BLI_windows_is_store_install(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_INFO, UNUSED_VARS, USER_REGISTER_ALL_USERS, and WM_cursor_wait().
Referenced by PREFERENCES_OT_unassociate_blend().