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:
authorJulian Eisel <julian@blender.org>2020-09-04 22:18:45 +0300
committerJulian Eisel <julian@blender.org>2020-09-04 22:26:31 +0300
commite6f0b60c2e9111af1878d31dcc295c59ed1bea77 (patch)
tree4df10fc869f5f512c233a2755246c1749bafc1c7 /source/blender/editors/space_graph/graph_buttons.c
parent47881791be0538f9558b2ef091e1761187df250d (diff)
UI Code Quality: Use derived struct for number buttons
For the man rationale behind this design, see 49f088e2d093. Further, this removes users of uiBut.a1/uiBut.a2, which is a very ugly design choice (hard to reason about). Note that I had to do rather ugly, specific exceptions for the number buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed, this special handling shouldn't be needed anymore. I also had to move a sanity check out of the button definition. It's now moved into a new debug only sanity checking function executed when finishing the layout definition (block end).
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 6dbf6226de8..47f910402fe 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -437,8 +437,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
0,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
uiItemL_respect_property_split(col, IFACE_("Value"), ICON_NONE);
@@ -455,8 +455,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
1,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt);
UI_but_unit_type_set(but, unit);
@@ -501,8 +501,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
0,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
@@ -520,8 +520,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
1,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
UI_but_unit_type_set(but, unit);
@@ -565,8 +565,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
0,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
@@ -584,8 +584,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
1,
0,
0,
- -1,
- -1,
+ 0,
+ 0,
NULL);
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
UI_but_unit_type_set(but, unit);