|
Blender V5.0
|
#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 "UI_interface_layout.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 wmOperatorStatus | preferences_extension_repo_add_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | 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 860 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 877 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, U, UNUSED_VARS, USER_REGISTER_ALL_USERS, and WM_cursor_wait().
Referenced by PREFERENCES_OT_associate_blend().
|
static |
Definition at line 842 of file userpref_ops.cc.
References BLI_windows_is_store_install(), C, CTX_wm_operator_poll_msg_set(), and UNUSED_VARS.
Referenced by PREFERENCES_OT_associate_blend(), and PREFERENCES_OT_unassociate_blend().
Definition at line 1062 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 1047 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 1034 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 980 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, U, WM_drag_get_string(), and WM_DRAG_STRING.
Referenced by ED_dropbox_drop_extension().
|
static |
Definition at line 1071 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 1088 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(), C, blender::ed::asset::list::clear_all_library(), dirname(), FILE_MAXFILE, MEM_freeN(), NC_WINDOW, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), U, 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 C, 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(), C, CLAMP, blender::ed::asset::list::clear_all_library(), NC_SPACE, ND_SPACE_ASSET_PARAMS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), U, 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(), C, CTX_wm_operator_poll_msg_set(), and U.
Referenced by PREFERENCES_OT_asset_library_remove().
|
static |
Definition at line 85 of file userpref_ops.cc.
References BLI_addtail(), MEM_callocN(), OPERATOR_FINISHED, and U.
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, RNA_int_get(), and U.
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(), C, CTX_data_main(), bUserExtensionRepo::custom_dirpath, ELEM, FILE_MAX, bUserExtensionRepo::flag, i, Local, module, bUserExtensionRepo::name, 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_discrete(), 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_UTF8, U, 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 404 of file userpref_ops.cc.
References C, 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 424 of file userpref_ops.cc.
References col, IFACE_, wmOperator::layout, Line, Local, uiLayout::prop(), ptr, wmOperator::ptr, Remote, RNA_boolean_get(), RNA_enum_get(), RNA_string_length(), uiLayout::row(), uiLayout::separator(), UI_ITEM_NONE, UI_ITEM_R_IMMEDIATE, uiLayout::use_property_decorate_set(), and uiLayout::use_property_split_set().
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 665 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(), C, 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, U, 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 611 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(), C, FILE_MAX, bUserExtensionRepo::flag, i, IFACE_, OPERATOR_CANCELLED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), bUserExtensionRepo::source, U, 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 602 of file userpref_ops.cc.
References BLI_listbase_is_empty(), C, CTX_wm_operator_poll_msg_set(), and U.
Referenced by PREFERENCES_OT_extension_repo_remove().
|
static |
Definition at line 783 of file userpref_ops.cc.
References BKE_reportf(), C, G, G_FLAG_INTERNET_ALLOW, blender::wm::InvokeDefault, OPERATOR_CANCELLED, OPERATOR_FINISHED, ot, wmOperator::ptr, wmOperator::reports, RNA_string_get(), RNA_string_set(), RPT_ERROR, STRPREFIX, 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 FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, 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 OPTYPE_INTERNAL, ot, preferences_asset_library_remove_exec(), preferences_asset_library_remove_poll(), and RNA_def_int().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 914 of file userpref_ops.cc.
References associate_blend_exec(), associate_blend_poll(), and ot.
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 93 of file userpref_ops.cc.
References OPTYPE_INTERNAL, ot, and preferences_autoexec_add_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 121 of file userpref_ops.cc.
References OPTYPE_INTERNAL, ot, preferences_autoexec_remove_exec(), and RNA_def_int().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 469 of file userpref_ops.cc.
References bUserExtensionRepo::custom_dirpath, Local, bUserExtensionRepo::name, OPTYPE_INTERNAL, OPTYPE_REGISTER, ot, preferences_extension_repo_add_exec(), preferences_extension_repo_add_invoke(), preferences_extension_repo_add_ui(), 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(), and RNA_struct_type_find_property().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 754 of file userpref_ops.cc.
References OPTYPE_INTERNAL, ot, preferences_extension_repo_remove_exec(), preferences_extension_repo_remove_invoke(), preferences_extension_repo_remove_poll(), PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), and RNA_def_property_flag().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 823 of file userpref_ops.cc.
References ot, preferences_extension_url_drop_invoke(), and RNA_def_string().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 65 of file userpref_ops.cc.
References OPTYPE_REGISTER, ot, and preferences_reset_default_theme_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 962 of file userpref_ops.cc.
References associate_blend_poll(), ot, and unassociate_blend_exec().
Referenced by ED_operatortypes_userpref().
|
static |
Definition at line 54 of file userpref_ops.cc.
References C, CTX_data_main(), NC_WINDOW, OPERATOR_FINISHED, U, 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 926 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, U, UNUSED_VARS, USER_REGISTER_ALL_USERS, and WM_cursor_wait().
Referenced by PREFERENCES_OT_unassociate_blend().