Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-15 18:02:44 +0300
committerHans Goudey <h.goudey@me.com>2020-10-15 18:02:44 +0300
commit15d78ea85b602cfda4e4b825d44bede71a06d86f (patch)
tree4768379d7e8ef5e055d130ce0c6c610f32c67fd7 /source/blender/editors/interface/interface.c
parentd1b3439b80fd6e9a0caa653cd55c7a5def18b122 (diff)
UI: Add reset to default value to keymap
With all the work on DNA defaults for 2.91, it's nice to expose this convenient operator. This was already hardcoded in the UI code to the backspace key, adding it to the keymap instead will make the shortcut automatically show in the button right click menu. Differential Revision: https://developer.blender.org/D9219
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 94b93c11f6c..c2a4465af07 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3123,23 +3123,6 @@ bool ui_but_string_set(bContext *C, uiBut *but, const char *str)
return false;
}
-void ui_but_default_set(bContext *C, const bool all, const bool use_afterfunc)
-{
- wmOperatorType *ot = WM_operatortype_find("UI_OT_reset_default_button", true);
-
- if (use_afterfunc) {
- PointerRNA *ptr = ui_handle_afterfunc_add_operator(ot, WM_OP_EXEC_DEFAULT, true);
- RNA_boolean_set(ptr, "all", all);
- }
- else {
- PointerRNA ptr;
- WM_operator_properties_create_ptr(&ptr, ot);
- RNA_boolean_set(&ptr, "all", all);
- WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &ptr);
- WM_operator_properties_free(&ptr);
- }
-}
-
static double soft_range_round_up(double value, double max)
{
/* round up to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, ..