Commit: 299f6470049c16e388aaa07d426ca3d622c76975
Author: Joshua Leung
Date: Mon Oct 26 23:24:41 2015 +1300
Branches: blender-v2.76-release
https://developer.blender.org/rB299f6470049c16e388aaa07d426ca3d622c76975
Fix: Prevent warnings from popping up when trying to edit driver expressions
from buttons
Previously, a warning was added to provide feedback to users trying to change
the values
of driven properties why their edits would not have any effect on the
propeerty. However,
it turned out that instead of only showing up when the user tried to
increment/decrement/slide
the property's value, it was also firing everytime they were trying to edit the
expression.
That however is not what we want at all!
This fix assumes that BUTTON_STATE_TEXT_EDITING is used for expression editing,
and
BUTTON_STATE_NUM_EDITING (or everything else) refers to the user trying to
adjust the
value normally.
===================================================================
M source/blender/editors/interface/interface_handlers.c
===================================================================
diff --git a/source/blender/editors/interface/interface_handlers.c
b/source/blender/editors/interface/interface_handlers.c
index 3fd2ba6..1b52140 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7517,8 +7517,14 @@ static void button_activate_state(bContext *C, uiBut
*but, uiHandleButtonState s
else if (data->state == BUTTON_STATE_NUM_EDITING) {
ui_numedit_end(but, data);
- if (but->flag & UI_BUT_DRIVEN)
- WM_report(C, RPT_INFO, "Can't edit driven number value,
see graph editor for the driver setup.");
+ if (but->flag & UI_BUT_DRIVEN) {
+ /* Only warn when editing stepping/dragging the value.
+ * No warnings should show for editing driver
expressions though!
+ */
+ if (state != BUTTON_STATE_TEXT_EDITING) {
+ WM_report(C, RPT_INFO, "Can't edit driven
number value, see graph editor for the driver setup.");
+ }
+ }
if (ui_but_is_cursor_warp(but)) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs