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:
authorCampbell Barton <ideasman42@gmail.com>2012-11-13 01:44:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-13 01:44:48 +0400
commit1c32617f1e587a878a881012f7850aa6d72394d1 (patch)
tree8eaba8ce02d916cc0026587dd7f68cedbb77ccc9 /source/blender/editors
parentd3c3f07133ce450318af94d622c48106ff877c1a (diff)
remove 'Reset' button from operator UI, instead have 'Restore Defaults' in preset menu.
If this is needed we can add the reset button back as an option for certain operators, but AFAICS any operator with enough settings that resetting them all would be annoying - could have presets enabled.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_layout.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 52d909a34c0..9eec7c195b2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -68,6 +68,8 @@
#define EM_SEPR_X 6
#define EM_SEPR_Y 6
+// #define USE_OP_RESET_BUT // we may want to make this optional, disable for now.
+
#define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement) \
if (ot == NULL) { \
ui_item_disabled(layout, _opname); \
@@ -2840,10 +2842,12 @@ const char *uiLayoutIntrospect(uiLayout *layout)
return str;
}
+#ifdef USE_OP_RESET_BUT
static void ui_layout_operator_buts__reset_cb(bContext *UNUSED(C), void *op_pt, void *UNUSED(arg_dummy2))
{
WM_operator_properties_reset((wmOperator *)op_pt);
}
+#endif
/* this function does not initialize the layout, functions can be called on the layout before and after */
void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
@@ -2911,6 +2915,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
}
}
+#ifdef USE_OP_RESET_BUT
/* its possible that reset can do nothing if all have PROP_SKIP_SAVE enabled
* but this is not so important if this button is drawn in those cases
* (which isn't all that likely anyway) - campbell */
@@ -2925,6 +2930,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Reset operator defaults"));
uiButSetFunc(but, ui_layout_operator_buts__reset_cb, op, NULL);
}
+#endif
/* set various special settings for buttons */
{