From d29ce3d53118b4f6e158ac74fc9c07c2880bfe7e Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 1 Mar 2024 14:26:45 -0500 Subject: [PATCH] UI: Remove uiBut a1 and a2 values Over the last couple years (!) UI buttons have moved to derived classes, meaning we don't need to use the same "a1" and "a2" variables to store different information. At this point, that information is set specifically by internal UI code, or functions like `UI_but_*_set`. These values are only set to their default 0 values now (or -1 in some non-meaningful cases). This commit removes the values from buttons and removes the remaining a1 and a2 arguments from the UI API. --- .../blender/editors/animation/fmodifier_ui.cc | 6 - .../editors/asset/intern/asset_shelf.cc | 2 - source/blender/editors/curve/editfont.cc | 8 +- .../blender/editors/include/UI_interface_c.hh | 8 - source/blender/editors/interface/interface.cc | 129 ++--------- .../interface/interface_context_menu.cc | 12 - .../editors/interface/interface_intern.hh | 7 - .../editors/interface/interface_layout.cc | 86 ++----- .../interface_region_color_picker.cc | 4 - .../interface/interface_region_menu_pie.cc | 20 +- .../interface/interface_region_menu_popup.cc | 19 +- .../interface_template_asset_view.cc | 2 - .../interface/interface_template_list.cc | 8 - .../editors/interface/interface_templates.cc | 210 ++---------------- .../editors/interface/interface_utils.cc | 2 +- .../interface/views/abstract_view_item.cc | 2 - .../editors/interface/views/grid_view.cc | 6 - .../editors/interface/views/tree_view.cc | 8 +- .../editors/space_buttons/buttons_texture.cc | 4 - .../editors/space_clip/clip_buttons.cc | 15 +- .../blender/editors/space_file/file_draw.cc | 8 - .../editors/space_graph/graph_buttons.cc | 8 - .../editors/space_image/image_buttons.cc | 10 - .../editors/space_node/link_drag_search.cc | 2 - .../blender/editors/space_node/node_draw.cc | 48 +--- .../blender/editors/space_node/node_select.cc | 2 - .../editors/space_node/node_templates.cc | 10 - .../editors/space_outliner/outliner_draw.cc | 14 -- .../editors/space_outliner/outliner_tools.cc | 2 - .../sequencer_channels_draw.cc | 2 - .../space_spreadsheet/spreadsheet_layout.cc | 28 --- .../editors/space_view3d/view3d_buttons.cc | 10 +- .../blender/windowmanager/intern/wm_files.cc | 48 +--- .../windowmanager/intern/wm_operators.cc | 12 +- .../windowmanager/intern/wm_splash_screen.cc | 2 +- 35 files changed, 80 insertions(+), 684 deletions(-) diff --git a/source/blender/editors/animation/fmodifier_ui.cc b/source/blender/editors/animation/fmodifier_ui.cc index 4e2255c26a2..b592250b8d9 100644 --- a/source/blender/editors/animation/fmodifier_ui.cc +++ b/source/blender/editors/animation/fmodifier_ui.cc @@ -335,8 +335,6 @@ static void fmodifier_panel_header(const bContext *C, Panel *panel) nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Delete Modifier")); FModifierDeleteContext *ctx = static_cast( MEM_mallocN(sizeof(FModifierDeleteContext), __func__)); @@ -695,8 +693,6 @@ static void envelope_panel_draw(const bContext *C, Panel *panel) nullptr, 0, 0, - 0, - 0, TIP_("Add a new control-point to the envelope on the current frame")); UI_but_func_set(but, fmod_envelope_addpoint_cb, env, nullptr); @@ -726,8 +722,6 @@ static void envelope_panel_draw(const bContext *C, Panel *panel) nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Delete envelope control point")); UI_but_func_set(but, fmod_envelope_deletepoint_cb, env, POINTER_FROM_INT(i)); UI_block_align_begin(block); diff --git a/source/blender/editors/asset/intern/asset_shelf.cc b/source/blender/editors/asset/intern/asset_shelf.cc index b942d8c76e6..fde77285311 100644 --- a/source/blender/editors/asset/intern/asset_shelf.cc +++ b/source/blender/editors/asset/intern/asset_shelf.cc @@ -660,8 +660,6 @@ static uiBut *add_tab_button(uiBlock &block, StringRefNull name) nullptr, 0, 0, - 0, - 0, TIP_("Enable catalog, making contained assets visible in the asset shelf")); UI_but_drawflag_enable(but, UI_BUT_ALIGN_DOWN); diff --git a/source/blender/editors/curve/editfont.cc b/source/blender/editors/curve/editfont.cc index e3b12879427..fbd3798811e 100644 --- a/source/blender/editors/curve/editfont.cc +++ b/source/blender/editors/curve/editfont.cc @@ -707,8 +707,6 @@ static uiBlock *wm_block_insert_unicode_create(bContext *C, ARegion *region, voi edit_string, 0, 7, - 0, - 0, TIP_("Unicode codepoint hex value")); UI_but_flag_enable(text_but, UI_BUT_ACTIVATE_ON_INIT); /* Hitting Enter in the text input is treated the same as clicking the Confirm button. */ @@ -731,17 +729,17 @@ static uiBlock *wm_block_insert_unicode_create(bContext *C, ARegion *region, voi if (windows_layout) { confirm = uiDefIconTextBut( - block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, 0, 0, nullptr); + block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, nullptr); uiLayoutColumn(split, false); } cancel = uiDefIconTextBut( - block, UI_BTYPE_BUT, 0, 0, "Cancel", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, 0, 0, nullptr); + block, UI_BTYPE_BUT, 0, 0, "Cancel", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, nullptr); if (!windows_layout) { uiLayoutColumn(split, false); confirm = uiDefIconTextBut( - block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, 0, 0, nullptr); + block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, nullptr); } UI_block_func_set(block, nullptr, nullptr, nullptr); diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 91c60984a6a..31a70954ebf 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -995,8 +995,6 @@ uiBut *uiDefBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip); uiBut *uiDefButF(uiBlock *block, int type, @@ -1021,8 +1019,6 @@ uiBut *uiDefButI(uiBlock *block, int *poin, float min, float max, - float a1, - float a2, const char *tip); uiBut *uiDefButBitI(uiBlock *block, int type, @@ -1147,8 +1143,6 @@ uiBut *uiDefIconBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip); uiBut *uiDefIconButI(uiBlock *block, int type, @@ -1277,8 +1271,6 @@ uiBut *uiDefIconTextBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip); uiBut *uiDefIconTextButI(uiBlock *block, int type, diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 7758a5c27f1..545edd1cc85 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -636,8 +636,8 @@ static float ui_but_get_float_precision(uiBut *but) if (but->type == UI_BTYPE_NUM_SLIDER) { return ((uiButNumberSlider *)but)->precision; } - - return but->a2; + BLI_assert_unreachable(); + return 1.0f; } static float ui_but_get_float_step_size(uiBut *but) @@ -648,8 +648,8 @@ static float ui_but_get_float_step_size(uiBut *but) if (but->type == UI_BTYPE_NUM_SLIDER) { return ((uiButNumberSlider *)but)->step_size; } - - return but->a1; + BLI_assert_unreachable(); + return 1.0f; } static bool ui_but_hide_fraction(uiBut *but, double value) @@ -4039,11 +4039,6 @@ uiBut *ui_but_change_type(uiBut *but, eButType new_type) /** * \param x, y: The lower left hand corner of the button (X axis) * \param width, height: The size of the button. - * - * for float buttons: - * \param a1: Click Step (how much to change the value each click) - * \param a2: Number of decimal point values to display. 0 defaults to 3 (0.000) - * 1,2,3, and a maximum of 4, all greater values will be clamped to 4. */ static uiBut *ui_def_but(uiBlock *block, int type, @@ -4056,18 +4051,10 @@ static uiBut *ui_def_but(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip) { BLI_assert(width >= 0 && height >= 0); - /* we could do some more error checks here */ - if ((type & BUTTYPE) == UI_BTYPE_LABEL) { - BLI_assert((poin != nullptr || min != 0.0f || max != 0.0f || (a1 == 0.0f && a2 != 0.0f) || - (a1 != 0.0f && a1 != 1.0f)) == false); - } - if (type & UI_BUT_POIN_TYPES) { /* a pointer is required */ if (poin == nullptr) { BLI_assert(0); @@ -4093,8 +4080,6 @@ static uiBut *ui_def_but(uiBlock *block, but->poin = (char *)poin; but->hardmin = but->softmin = min; but->hardmax = but->softmax = max; - but->a1 = a1; - but->a2 = a2; but->tip = tip; but->disabled_info = block->lockstr; @@ -4313,20 +4298,8 @@ static void ui_def_but_rna__menu(bContext *C, uiLayout *layout, void *but_p) if (title && title[0] && (categories == 0) && (!but->str[0] || !prior_label)) { /* Show title when no categories and calling button has no text or prior label. */ - uiDefBut(block, - UI_BTYPE_LABEL, - 0, - title, - 0, - 0, - UI_UNIT_X * 5, - UI_UNIT_Y, - nullptr, - 0.0, - 0.0, - 0, - 0, - ""); + uiDefBut( + block, UI_BTYPE_LABEL, 0, title, 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); uiItemS(layout); } @@ -4385,8 +4358,6 @@ static void ui_def_but_rna__menu(bContext *C, uiLayout *layout, void *but_p) nullptr, 0.0, 0.0, - 0, - 0, ""); } } @@ -4428,8 +4399,6 @@ static void ui_def_but_rna__menu(bContext *C, uiLayout *layout, void *but_p) &handle->retvalue, item->value, 0.0, - 0, - -1, item->description); } if (item->value == current_value) { @@ -4622,8 +4591,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, } /* now create button */ - uiBut *but = ui_def_but( - block, type, retval, str, x, y, width, height, nullptr, min, max, step, precision, tip); + uiBut *but = ui_def_but(block, type, retval, str, x, y, width, height, nullptr, min, max, tip); if (but->type == UI_BTYPE_NUM) { /* Set default values, can be overridden later. */ @@ -4690,9 +4658,6 @@ static uiBut *ui_def_but_rna(uiBlock *block, uiButNumberSlider *number_but = (uiButNumberSlider *)but; number_but->step_size = ui_get_but_step_unit(but, number_but->step_size); } - else { - but->a1 = ui_get_but_step_unit(but, but->a1); - } } if (func) { @@ -4726,8 +4691,7 @@ static uiBut *ui_def_but_rna_propname(uiBlock *block, block, type, retval, str, x, y, width, height, ptr, prop, index, min, max, tip); } else { - but = ui_def_but( - block, type, retval, propname, x, y, width, height, nullptr, min, max, -1.0f, -1.0f, tip); + but = ui_def_but(block, type, retval, propname, x, y, width, height, nullptr, min, max, tip); UI_but_disable(but, N_("Unknown Property")); } @@ -4750,7 +4714,7 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, tip = RNA_struct_ui_description(ot->srna); } - uiBut *but = ui_def_but(block, type, -1, str, x, y, width, height, nullptr, 0, 0, 0, 0, tip); + uiBut *but = ui_def_but(block, type, -1, str, x, y, width, height, nullptr, 0, 0, tip); but->optype = ot; but->opcontext = opcontext; but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_rna_undo(), we never need undo here */ @@ -4778,12 +4742,9 @@ uiBut *uiDefBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip) { - uiBut *but = ui_def_but( - block, type, retval, str, x, y, width, height, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, str, x, y, width, height, poin, min, max, tip); ui_but_update(but); @@ -4793,8 +4754,7 @@ uiBut *uiDefBut(uiBlock *block, uiBut *uiDefButImage( uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]) { - uiBut *but = ui_def_but( - block, UI_BTYPE_IMAGE, 0, "", x, y, width, height, imbuf, 0, 0, 0, 0, ""); + uiBut *but = ui_def_but(block, UI_BTYPE_IMAGE, 0, "", x, y, width, height, imbuf, 0, 0, ""); if (color) { copy_v4_v4_uchar(but->col, color); } @@ -4981,8 +4941,6 @@ static uiBut *uiDefButBit(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip) { const int bitIdx = findBitIndex(bit); @@ -5000,8 +4958,6 @@ static uiBut *uiDefButBit(uiBlock *block, poin, min, max, - a1, - a2, tip); } uiBut *uiDefButF(uiBlock *block, @@ -5028,8 +4984,6 @@ uiBut *uiDefButF(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefButI(uiBlock *block, @@ -5043,8 +4997,6 @@ uiBut *uiDefButI(uiBlock *block, int *poin, float min, float max, - float a1, - float a2, const char *tip) { return uiDefBut(block, @@ -5058,8 +5010,6 @@ uiBut *uiDefButI(uiBlock *block, (void *)poin, min, max, - a1, - a2, tip); } uiBut *uiDefButBitI(uiBlock *block, @@ -5088,8 +5038,6 @@ uiBut *uiDefButBitI(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefButS(uiBlock *block, @@ -5116,8 +5064,6 @@ uiBut *uiDefButS(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefButBitS(uiBlock *block, @@ -5146,8 +5092,6 @@ uiBut *uiDefButBitS(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefButC(uiBlock *block, @@ -5174,8 +5118,6 @@ uiBut *uiDefButC(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefButBitC(uiBlock *block, @@ -5204,8 +5146,6 @@ uiBut *uiDefButBitC(uiBlock *block, (void *)poin, min, max, - 0, - 0, tip); } uiBut *uiDefButR(uiBlock *block, @@ -5293,12 +5233,9 @@ uiBut *uiDefIconBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip) { - uiBut *but = ui_def_but( - block, type, retval, "", x, y, width, height, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, "", x, y, width, height, poin, min, max, tip); ui_but_update_and_icon_set(but, icon); return but; } @@ -5331,8 +5268,6 @@ static uiBut *uiDefIconButBit(uiBlock *block, poin, min, max, - 0.0f, - 0.0f, tip); } @@ -5360,8 +5295,6 @@ uiBut *uiDefIconButI(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefIconButBitI(uiBlock *block, @@ -5416,8 +5349,6 @@ uiBut *uiDefIconButS(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefIconButBitS(uiBlock *block, @@ -5559,12 +5490,9 @@ uiBut *uiDefIconTextBut(uiBlock *block, void *poin, float min, float max, - float a1, - float a2, const char *tip) { - uiBut *but = ui_def_but( - block, type, retval, str, x, y, width, height, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, str, x, y, width, height, poin, min, max, tip); ui_but_update_and_icon_set(but, icon); but->drawflag |= UI_BUT_ICON_LEFT; return but; @@ -5595,8 +5523,6 @@ uiBut *uiDefIconTextButI(uiBlock *block, (void *)poin, min, max, - 0.0f, - 0.0f, tip); } uiBut *uiDefIconTextButR(uiBlock *block, @@ -5972,8 +5898,7 @@ uiBut *uiDefBlockBut(uiBlock *block, short height, const char *tip) { - uiBut *but = ui_def_but( - block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, arg, 0.0, 0.0, tip); but->block_create_func = func; ui_but_update(but); return but; @@ -5990,7 +5915,7 @@ uiBut *uiDefBlockButN(uiBlock *block, const char *tip) { uiBut *but = ui_def_but( - block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, nullptr, 0.0, 0.0, 0.0, 0.0, tip); + block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, nullptr, 0.0, 0.0, tip); but->block_create_func = func; if (but->func_argN) { MEM_freeN(but->func_argN); @@ -6011,7 +5936,7 @@ uiBut *uiDefMenuBut(uiBlock *block, const char *tip) { uiBut *but = ui_def_but( - block, UI_BTYPE_PULLDOWN, 0, str, x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); + block, UI_BTYPE_PULLDOWN, 0, str, x, y, width, height, arg, 0.0, 0.0, tip); but->menu_create_func = func; ui_but_update(but); return but; @@ -6029,7 +5954,7 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, const char *tip) { uiBut *but = ui_def_but( - block, UI_BTYPE_PULLDOWN, 0, str, x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); + block, UI_BTYPE_PULLDOWN, 0, str, x, y, width, height, arg, 0.0, 0.0, tip); ui_def_but_icon(but, icon, UI_HAS_ICON); @@ -6053,7 +5978,7 @@ uiBut *uiDefIconMenuBut(uiBlock *block, const char *tip) { uiBut *but = ui_def_but( - block, UI_BTYPE_PULLDOWN, 0, "", x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); + block, UI_BTYPE_PULLDOWN, 0, "", x, y, width, height, arg, 0.0, 0.0, tip); ui_def_but_icon(but, icon, UI_HAS_ICON); but->drawflag &= ~UI_BUT_ICON_LEFT; @@ -6076,7 +6001,7 @@ uiBut *uiDefIconBlockBut(uiBlock *block, const char *tip) { uiBut *but = ui_def_but( - block, UI_BTYPE_BLOCK, retval, "", x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); + block, UI_BTYPE_BLOCK, retval, "", x, y, width, height, arg, 0.0, 0.0, tip); ui_def_but_icon(but, icon, UI_HAS_ICON); @@ -6099,20 +6024,8 @@ uiBut *uiDefSearchBut(uiBlock *block, short height, const char *tip) { - uiBut *but = ui_def_but(block, - UI_BTYPE_SEARCH_MENU, - retval, - "", - x, - y, - width, - height, - arg, - 0.0, - maxncpy, - 0.0f, - 0.0f, - tip); + uiBut *but = ui_def_but( + block, UI_BTYPE_SEARCH_MENU, retval, "", x, y, width, height, arg, 0.0, maxncpy, tip); ui_def_but_icon(but, icon, UI_HAS_ICON); diff --git a/source/blender/editors/interface/interface_context_menu.cc b/source/blender/editors/interface/interface_context_menu.cc index 43c1c6e1dbb..7daf2509502 100644 --- a/source/blender/editors/interface/interface_context_menu.cc +++ b/source/blender/editors/interface/interface_context_menu.cc @@ -1107,8 +1107,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, ""); item_found = true; UI_but_func_set(but2, [um, umi](bContext &) { @@ -1135,8 +1133,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, "Add to a user defined context menu (stored in the user preferences)"); UI_but_func_set(but2, [but](bContext &C) { bUserMenu *um = ED_screen_user_menu_ensure(&C); @@ -1188,8 +1184,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but2, [but](bContext &C) { UI_popup_block_invoke(&C, menu_change_shortcut, but, nullptr); @@ -1208,8 +1202,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, TIP_("Only keyboard shortcuts can be edited that way, " "please use User Preferences otherwise")); UI_but_flag_enable(but2, UI_BUT_DISABLED); @@ -1228,8 +1220,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but2, [but](bContext &C) { remove_shortcut_func(&C, but); }); } @@ -1248,8 +1238,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but2, [but](bContext &C) { UI_popup_block_ex(&C, menu_add_shortcut, nullptr, menu_add_shortcut_cancel, but, nullptr); diff --git a/source/blender/editors/interface/interface_intern.hh b/source/blender/editors/interface/interface_intern.hh index 37996efa5bf..9382b27253a 100644 --- a/source/blender/editors/interface/interface_intern.hh +++ b/source/blender/editors/interface/interface_intern.hh @@ -190,13 +190,6 @@ struct uiBut { char *poin = nullptr; float hardmin = 0, hardmax = 0, softmin = 0, softmax = 0; - /* both these values use depends on the button type - * (polymorphic struct or union would be nicer for this stuff) */ - - float a1 = 0; - - float a2 = 0; - uchar col[4] = {0}; /** See \ref UI_but_func_identity_compare_set(). */ diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index d02bcc2d2d1..cc42bde7fd0 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -555,7 +555,7 @@ static void ui_item_array(uiLayout *layout, /* create label */ if (name[0] && show_text) { - uiDefBut(block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); } /* create buttons */ @@ -1052,7 +1052,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, else { w_label = w_hint / 3; } - uiDefBut(block, UI_BTYPE_LABEL, 0, name, x, y, w_label, h, nullptr, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_LABEL, 0, name, x, y, w_label, h, nullptr, 0.0, 0.0, ""); } } @@ -1204,8 +1204,7 @@ static void ui_item_disabled(uiLayout *layout, const char *name) const int w = ui_text_icon_width(layout, name, 0, false); - uiBut *but = uiDefBut( - block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, ""); + uiBut *but = uiDefBut(block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); UI_but_disable(but, ""); } @@ -1514,8 +1513,6 @@ void uiItemsFullEnumO_items(uiLayout *layout, nullptr, 0, 0, - 0, - 0, nullptr); } else { @@ -1606,8 +1603,6 @@ void uiItemsFullEnumO_items(uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, ""); uiItemS(target); } @@ -2300,8 +2295,6 @@ void uiItemFullR(uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, ""); but->drawflag |= UI_BUT_TEXT_RIGHT; but->drawflag &= ~UI_BUT_TEXT_LEFT; @@ -2312,7 +2305,7 @@ void uiItemFullR(uiLayout *layout, else { if (name) { but = uiDefBut( - block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, ""); + block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); but->drawflag |= UI_BUT_TEXT_RIGHT; but->drawflag &= ~UI_BUT_TEXT_LEFT; @@ -3133,8 +3126,6 @@ void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); but->flag |= UI_BUT_DISABLED; return; @@ -3156,8 +3147,6 @@ void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Animate property")); UI_but_func_set(but, ui_but_anim_decorate_cb, but, nullptr); @@ -3280,29 +3269,15 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon) layout, name, icon, ui_text_pad_none, UI_FSTYLE_WIDGET_LABEL); uiBut *but; if (icon && name[0]) { - but = uiDefIconTextBut(block, - UI_BTYPE_LABEL, - 0, - icon, - name, - 0, - 0, - w, - UI_UNIT_Y, - nullptr, - 0.0, - 0.0, - 0, - 0, - nullptr); + but = uiDefIconTextBut( + block, UI_BTYPE_LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, nullptr); } else if (icon) { but = uiDefIconBut( - block, UI_BTYPE_LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, nullptr); + block, UI_BTYPE_LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, nullptr); } else { - but = uiDefBut( - block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, nullptr); + but = uiDefBut(block, UI_BTYPE_LABEL, 0, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, nullptr); } /* to compensate for string size padding in ui_text_icon_width, @@ -3420,8 +3395,7 @@ void uiItemV(uiLayout *layout, const char *name, int icon, int argval) uiDefIconButI(block, UI_BTYPE_BUT, argval, icon, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, ""); } else { - uiDefButI( - block, UI_BTYPE_BUT, argval, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, -1, ""); + uiDefButI(block, UI_BTYPE_BUT, argval, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, ""); } } @@ -3463,8 +3437,6 @@ void uiItemS_ex(uiLayout *layout, float factor, const LayoutSeparatorType type) nullptr, 0.0, 0.0, - 0.0, - 0, ""); if (but_type == UI_BTYPE_SEPR_LINE) { @@ -3509,8 +3481,6 @@ void uiItemProgressIndicator(uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, ""); if (has_text && (progress_type == UI_BUT_PROGRESS_TYPE_RING)) { @@ -3550,8 +3520,6 @@ void uiItemSpacer(uiLayout *layout) nullptr, 0.0, 0.0, - 0, - 0, ""); } @@ -5001,21 +4969,8 @@ PanelLayout uiLayoutPanelProp(const bContext *C, uiBlock *block = uiLayoutGetBlock(row); const int icon = is_open ? ICON_DOWNARROW_HLT : ICON_RIGHTARROW; const int width = ui_text_icon_width(layout, "", icon, false); - uiDefIconTextBut(block, - UI_BTYPE_LABEL, - 0, - icon, - "", - 0, - 0, - width, - UI_UNIT_Y, - nullptr, - 0.0f, - 0.0f, - 0.0f, - 0.0f, - ""); + uiDefIconTextBut( + block, UI_BTYPE_LABEL, 0, icon, "", 0, 0, width, UI_UNIT_Y, nullptr, 0.0f, 0.0f, ""); panel_layout.header = row; } @@ -5155,8 +5110,7 @@ static uiLayoutItemBx *ui_layout_box(uiLayout *layout, int type) UI_block_layout_set_current(layout->root->block, &box->litem); - box->roundbox = uiDefBut( - layout->root->block, type, 0, "", 0, 0, 0, 0, nullptr, 0.0, 0.0, 0, 0, ""); + box->roundbox = uiDefBut(layout->root->block, type, 0, "", 0, 0, 0, 0, nullptr, 0.0, 0.0, ""); return box; } @@ -5838,20 +5792,8 @@ static void ui_layout_add_padding_button(uiLayoutRoot *root) uiLayout *prev_layout = block->curlayout; block->curlayout = root->layout; - uiDefBut(block, - UI_BTYPE_SEPR, - 0, - "", - 0, - 0, - root->padding, - root->padding, - nullptr, - 0.0, - 0.0, - 0, - 0, - ""); + uiDefBut( + block, UI_BTYPE_SEPR, 0, "", 0, 0, root->padding, root->padding, nullptr, 0.0, 0.0, ""); block->curlayout = prev_layout; } } diff --git a/source/blender/editors/interface/interface_region_color_picker.cc b/source/blender/editors/interface/interface_region_color_picker.cc index c58df572830..9e7dee9db33 100644 --- a/source/blender/editors/interface/interface_region_color_picker.cc +++ b/source/blender/editors/interface/interface_region_color_picker.cc @@ -776,8 +776,6 @@ static void ui_block_colorpicker(uiBlock *block, hexcol, 0, 8, - 0, - 0, TIP_("Hex triplet for color (#RRGGBB)")); UI_but_flag_disable(bt, UI_BUT_UNDO); UI_but_func_set(bt, ui_colorpicker_hex_rna_cb, bt, hexcol); @@ -793,8 +791,6 @@ static void ui_block_colorpicker(uiBlock *block, nullptr, 0.0, 0.0, - 0, - 0, ""); ui_colorpicker_hide_reveal(block, (ePickerType)colormode); diff --git a/source/blender/editors/interface/interface_region_menu_pie.cc b/source/blender/editors/interface/interface_region_menu_pie.cc index b8af07e6e71..d2f815ab1f2 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.cc +++ b/source/blender/editors/interface/interface_region_menu_pie.cc @@ -154,26 +154,12 @@ uiPieMenu *UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmE nullptr, 0.0, 0.0, - 0, - 0, ""); } else { w = ui_pie_menu_title_width(title, 0); - but = uiDefBut(pie->block_radial, - UI_BTYPE_LABEL, - 0, - title, - 0, - 0, - w, - UI_UNIT_Y, - nullptr, - 0.0, - 0.0, - 0, - 0, - ""); + but = uiDefBut( + pie->block_radial, UI_BTYPE_LABEL, 0, title, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); } /* do not align left */ but->drawflag &= ~UI_BUT_TEXT_LEFT; @@ -393,8 +379,6 @@ void ui_pie_menu_level_create(uiBlock *block, nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, "Show more items of this menu"); UI_but_funcN_set(but, ui_pie_menu_level_invoke, remaining, &lvl); } diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc index 7cd6ec31583..b1ca5e76c10 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.cc +++ b/source/blender/editors/interface/interface_region_menu_popup.cc @@ -448,25 +448,12 @@ static void create_title_button(uiLayout *layout, const char *title, int icon) if (icon) { SNPRINTF(titlestr, " %s", title); - uiDefIconTextBut(block, - UI_BTYPE_LABEL, - 0, - icon, - titlestr, - 0, - 0, - 200, - UI_UNIT_Y, - nullptr, - 0.0, - 0.0, - 0, - 0, - ""); + uiDefIconTextBut( + block, UI_BTYPE_LABEL, 0, icon, titlestr, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); } else { uiBut *but = uiDefBut( - block, UI_BTYPE_LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, ""); + block, UI_BTYPE_LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, ""); but->drawflag = UI_BUT_TEXT_LEFT; } diff --git a/source/blender/editors/interface/interface_template_asset_view.cc b/source/blender/editors/interface/interface_template_asset_view.cc index aeccfaeab0e..a3cc67c8f89 100644 --- a/source/blender/editors/interface/interface_template_asset_view.cc +++ b/source/blender/editors/interface/interface_template_asset_view.cc @@ -99,8 +99,6 @@ static void asset_view_draw_item(uiList *ui_list, nullptr, 0, 0, - 0, - 0, ""); ui_def_but_icon(but, asset::handle_get_preview_icon_id(&asset_handle), diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc index 164047b8793..04721d7cbe7 100644 --- a/source/blender/editors/interface/interface_template_list.cc +++ b/source/blender/editors/interface/interface_template_list.cc @@ -835,8 +835,6 @@ static void ui_template_list_layout_draw(const bContext *C, &ui_list->list_scroll, 0, dyn_data->height - dyn_data->visual_height, - 0, - 0, ""); uiButScrollBar *but_scroll = reinterpret_cast(but); but_scroll->visual_height = dyn_data->visual_height; @@ -984,8 +982,6 @@ static void ui_template_list_layout_draw(const bContext *C, &ui_list->list_scroll, 0, dyn_data->height - dyn_data->visual_height, - 0, - 0, ""); uiButScrollBar *but_scroll = reinterpret_cast(but); but_scroll->visual_height = dyn_data->visual_height; @@ -1081,8 +1077,6 @@ static void ui_template_list_layout_draw(const bContext *C, &ui_list->list_scroll, 0, dyn_data->height - dyn_data->visual_height, - 0, - 0, ""); uiButScrollBar *but_scroll = reinterpret_cast(but); but_scroll->visual_height = dyn_data->visual_height; @@ -1161,8 +1155,6 @@ static void ui_template_list_layout_draw(const bContext *C, nullptr, 0.0, 0.0, - 0, - 0, ""); layout_data->draw_filter(ui_list, C, col); diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc index b243e007223..1ab0c645902 100644 --- a/source/blender/editors/interface/interface_templates.cc +++ b/source/blender/editors/interface/interface_templates.cc @@ -259,7 +259,7 @@ static uiBlock *template_common_search_menu(const bContext *C, const int h = 5 * U.widget_unit * preview_rows * scale; /* fake button, it holds space for search items */ - uiDefBut(block, UI_BTYPE_LABEL, 0, "", 10, 26, w, h, nullptr, 0, 0, 0, 0, nullptr); + uiDefBut(block, UI_BTYPE_LABEL, 0, "", 10, 26, w, h, nullptr, 0, 0, nullptr); but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, UI_UNIT_Y, ""); UI_but_search_preview_grid_size_set(but, preview_rows, preview_cols); @@ -281,8 +281,6 @@ static uiBlock *template_common_search_menu(const bContext *C, nullptr, 0, 0, - 0, - 0, nullptr); but = uiDefSearchBut(block, search, @@ -1282,8 +1280,6 @@ static uiBut *template_id_def_new_but(uiBlock *block, nullptr, 0, 0, - 0, - 0, nullptr); UI_but_funcN_set( but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_ADD_NEW)); @@ -1398,8 +1394,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, TIP_("Indirect library data-block, cannot be made local, " "Shift + Click to create a library override hierarchy")); } @@ -1415,8 +1409,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, TIP_("Direct linked library data-block, click to make local, " "Shift + Click to create a library override")); } @@ -1441,8 +1433,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, TIP_("Library override of linked data-block, click to make fully local, " "Shift + Click to clear the library override and toggle if it can be edited")); UI_but_funcN_set( @@ -1468,8 +1458,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, TIP_("Display number of users of this data (click to make a single-user copy)")); but->flag |= UI_BUT_UNDO; @@ -1577,8 +1565,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, nullptr); UI_but_funcN_set( but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_OPEN)); @@ -1624,8 +1610,6 @@ static void template_ID(const bContext *C, nullptr, 0, 0, - 0, - 0, TIP_("Unlink data-block " "(Shift + Click to set users to zero, data will then not be saved)")); UI_but_funcN_set( @@ -3216,20 +3200,8 @@ void uiTemplatePreview(uiLayout *layout, uiLayoutSetKeepAspect(col, true); /* add preview */ - uiDefBut(block, - UI_BTYPE_EXTRA, - 0, - "", - 0, - 0, - UI_UNIT_X * 10, - ui_preview->height, - pid, - 0.0, - 0.0, - 0, - 0, - ""); + uiDefBut( + block, UI_BTYPE_EXTRA, 0, "", 0, 0, UI_UNIT_X * 10, ui_preview->height, pid, 0.0, 0.0, ""); UI_but_func_drawextra_set(block, ED_preview_draw, pparent, slot); UI_block_func_handle_set(block, do_preview_buttons, nullptr); @@ -3463,8 +3435,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [coba, cb](bContext &C) { colorband_flip(&C, coba); @@ -3485,8 +3455,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [coba, cb](bContext &C) { colorband_distribute(&C, coba, false); @@ -3507,8 +3475,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [coba, cb](bContext &C) { colorband_distribute(&C, coba, true); @@ -3536,8 +3502,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [coba, cb](bContext &C) { BKE_colorband_init(coba, true); @@ -3615,8 +3579,6 @@ static void colorband_buttons_layout(uiLayout *layout, nullptr, 0, 0, - 0, - 0, TIP_("Add a new color stop to the color ramp")); UI_but_func_set(bt, [coba, cb](bContext &C) { colorband_add(C, cb, *coba); }); @@ -3632,8 +3594,6 @@ static void colorband_buttons_layout(uiLayout *layout, nullptr, 0, 0, - 0, - 0, TIP_("Delete the active position")); UI_but_func_set(bt, [coba, cb](bContext &C) { if (BKE_colorband_element_remove(coba, coba->cur)) { @@ -3674,20 +3634,8 @@ static void colorband_buttons_layout(uiLayout *layout, row = uiLayoutRow(layout, false); - bt = uiDefBut(block, - UI_BTYPE_COLORBAND, - 0, - "", - xs, - ys, - BLI_rctf_size_x(butr), - UI_UNIT_Y, - coba, - 0, - 0, - 0, - 0, - ""); + bt = uiDefBut( + block, UI_BTYPE_COLORBAND, 0, "", xs, ys, BLI_rctf_size_x(butr), UI_UNIT_Y, coba, 0, 0, ""); UI_but_func_set(bt, [cb](bContext &C) { rna_update_cb(C, cb); }); row = uiLayoutRow(layout, false); @@ -3818,8 +3766,6 @@ void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale) nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); ui_def_but_icon(but, icon_value, UI_HAS_ICON | UI_BUT_ICON_PREVIEW); } @@ -3952,8 +3898,6 @@ void uiTemplateIconView(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); } @@ -3994,8 +3938,7 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname uiLayout *col = uiLayoutColumn(layout, true); uiBlock *block = uiLayoutGetBlock(col); - uiDefBut( - block, UI_BTYPE_HISTOGRAM, 0, "", 0, 0, UI_UNIT_X * 10, hist->height, hist, 0, 0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_HISTOGRAM, 0, "", 0, 0, UI_UNIT_X * 10, hist->height, hist, 0, 0, ""); /* Resize grip. */ uiDefIconButI(block, @@ -4053,8 +3996,6 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname) scopes, 0, 0, - 0, - 0, ""); /* Resize grip. */ @@ -4113,8 +4054,6 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna scopes, 0, 0, - 0, - 0, ""); /* Resize grip. */ @@ -4321,8 +4260,6 @@ static uiBlock *curvemap_tools_func( nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [cumap](bContext &C) { BKE_curvemapping_reset_view(cumap); @@ -4344,8 +4281,6 @@ static uiBlock *curvemap_tools_func( nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [cumap, cb](bContext &C) { cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; @@ -4368,8 +4303,6 @@ static uiBlock *curvemap_tools_func( nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [cumap, cb](bContext &C) { cumap->flag |= CUMA_EXTEND_EXTRAPOLATE; @@ -4394,8 +4327,6 @@ static uiBlock *curvemap_tools_func( nullptr, 0.0, 0.0, - 0, - reset_mode, ""); UI_but_func_set(but, [cumap, cb, reset_mode](bContext &C) { CurveMap *cuma = cumap->cm + cumap->cur; @@ -4480,18 +4411,15 @@ static void curvemap_buttons_layout(uiLayout *layout, uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); if (cumap->cm[0].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, "X", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, "X", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[1].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, "Y", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, "Y", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[2].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, "Z", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, "Z", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } } @@ -4512,24 +4440,19 @@ static void curvemap_buttons_layout(uiLayout *layout, &cumap->cur, 0.0, 3.0, - 0.0, - 0.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[0].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("R"), 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("R"), 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[1].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("G"), 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("G"), 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[2].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("B"), 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("B"), 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } } @@ -4539,18 +4462,15 @@ static void curvemap_buttons_layout(uiLayout *layout, uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); if (cumap->cm[0].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("H"), 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("H"), 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[1].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("S"), 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("S"), 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } if (cumap->cm[2].curve) { - bt = uiDefButI( - block, UI_BTYPE_ROW, 0, IFACE_("V"), 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("V"), 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, ""); UI_but_func_set(bt, curvemap_buttons_redraw); } } @@ -4568,40 +4488,16 @@ static void curvemap_buttons_layout(uiLayout *layout, uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); /* Zoom in */ - bt = uiDefIconBut(block, - UI_BTYPE_BUT, - 0, - ICON_ZOOM_IN, - 0, - 0, - dx, - dx, - nullptr, - 0.0, - 0.0, - 0.0, - 0.0, - TIP_("Zoom in")); + bt = uiDefIconBut( + block, UI_BTYPE_BUT, 0, ICON_ZOOM_IN, 0, 0, dx, dx, nullptr, 0.0, 0.0, TIP_("Zoom in")); UI_but_func_set(bt, [cumap](bContext &C) { curvemap_buttons_zoom_in(&C, cumap); }); if (!curvemap_can_zoom_in(cumap)) { UI_but_disable(bt, ""); } /* Zoom out */ - bt = uiDefIconBut(block, - UI_BTYPE_BUT, - 0, - ICON_ZOOM_OUT, - 0, - 0, - dx, - dx, - nullptr, - 0.0, - 0.0, - 0.0, - 0.0, - TIP_("Zoom out")); + bt = uiDefIconBut( + block, UI_BTYPE_BUT, 0, ICON_ZOOM_OUT, 0, 0, dx, dx, nullptr, 0.0, 0.0, TIP_("Zoom out")); UI_but_func_set(bt, [cumap](bContext &C) { curvemap_buttons_zoom_out(&C, cumap); }); if (!curvemap_can_zoom_out(cumap)) { UI_but_disable(bt, ""); @@ -4649,7 +4545,7 @@ static void curvemap_buttons_layout(uiLayout *layout, const int size = max_ii(uiLayoutGetWidth(layout), UI_UNIT_X); row = uiLayoutRow(layout, false); uiButCurveMapping *curve_but = (uiButCurveMapping *)uiDefBut( - block, UI_BTYPE_CURVE, 0, "", 0, 0, size, 8.0f * UI_UNIT_X, cumap, 0.0f, 1.0f, -1, 0, ""); + block, UI_BTYPE_CURVE, 0, "", 0, 0, size, 8.0f * UI_UNIT_X, cumap, 0.0f, 1.0f, ""); curve_but->gradient_type = bg; /* Sliders for selected curve point. */ @@ -4692,8 +4588,6 @@ static void curvemap_buttons_layout(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Auto Handle")); UI_but_func_set(bt, [cumap, cb](bContext &C) { CurveMap *cuma = cumap->cm + cumap->cur; @@ -4718,8 +4612,6 @@ static void curvemap_buttons_layout(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Vector Handle")); UI_but_func_set(bt, [cumap, cb](bContext &C) { CurveMap *cuma = cumap->cm + cumap->cur; @@ -4742,8 +4634,6 @@ static void curvemap_buttons_layout(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Auto Clamped")); UI_but_func_set(bt, [cumap, cb](bContext &C) { CurveMap *cuma = cumap->cm + cumap->cur; @@ -4795,20 +4685,8 @@ static void curvemap_buttons_layout(uiLayout *layout, }); /* Curve handle delete point */ - bt = uiDefIconBut(block, - UI_BTYPE_BUT, - 0, - ICON_X, - 0, - 0, - dx, - dx, - nullptr, - 0.0, - 0.0, - 0.0, - 0.0, - TIP_("Delete points")); + bt = uiDefIconBut( + block, UI_BTYPE_BUT, 0, ICON_X, 0, 0, dx, dx, nullptr, 0.0, 0.0, TIP_("Delete points")); UI_but_func_set(bt, [cumap, cb](bContext &C) { BKE_curvemap_remove(cumap->cm + cumap->cur, SELECT); BKE_curvemapping_changed(cumap, false); @@ -4839,8 +4717,6 @@ static void curvemap_buttons_layout(uiLayout *layout, nullptr, 0.0f, 0.0f, - 0, - 0, TIP_("Reset Black/White point and curves")); UI_but_func_set(bt, [cumap, cb](bContext &C) { cumap->preset = CURVE_PRESET_LINE; @@ -4930,8 +4806,6 @@ static uiBlock *curve_profile_presets_fn(bContext *C, ARegion *region, void *cb_ nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [profile, cb, preset](bContext &C) { profile->preset = preset; @@ -4971,8 +4845,6 @@ static uiBlock *curve_profile_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [profile](bContext &C) { BKE_curveprofile_reset_view(profile); @@ -4992,8 +4864,6 @@ static uiBlock *curve_profile_tools_fn(bContext *C, ARegion *region, void *cb_v) nullptr, 0.0, 0.0, - 0, - 0, ""); UI_but_func_set(but, [profile, cb](bContext &C) { BKE_curveprofile_reset(profile); @@ -5122,8 +4992,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Reapply and update the preset, removing changes")); UI_but_func_set(bt, [profile, cb](bContext &C) { BKE_curveprofile_reset(profile); @@ -5151,8 +5019,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Zoom in")); UI_but_func_set(bt, [profile](bContext &C) { curve_profile_zoom_in(&C, profile); }); if (!curve_profile_can_zoom_in(profile)) { @@ -5171,8 +5037,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Zoom out")); UI_but_func_set(bt, [profile](bContext &C) { curve_profile_zoom_out(&C, profile); }); if (!curve_profile_can_zoom_out(profile)) { @@ -5195,8 +5059,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Reverse Path")); UI_but_func_set(bt, [profile, cb](bContext &C) { BKE_curveprofile_reverse(profile); @@ -5217,8 +5079,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Toggle Profile Clipping")); UI_but_func_set(bt, [profile, cb](bContext &C) { profile->flag ^= PROF_USE_CLIP; @@ -5260,8 +5120,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const profile, 0.0f, 1.0f, - -1, - 0, ""); /* Position sliders for (first) selected point */ @@ -5371,8 +5229,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Delete points")); UI_but_func_set(bt, [profile, cb](bContext &C) { BKE_curveprofile_remove_by_flag(profile, SELECT); @@ -6103,8 +5959,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); /* stick progress bar and cancel button together */ @@ -6129,8 +5983,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0.0f, - 0, nullptr); but_progress->progress_factor = progress; @@ -6150,8 +6002,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, TIP_("Stop this job")); } } @@ -6169,8 +6019,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, TIP_("Stop animation playback")); } } @@ -6238,8 +6086,6 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, ""); /* UI_BTYPE_ROUNDBOX's bg color is set in but->col. */ copy_v4_v4_uchar(but->col, report_icon_color); @@ -6256,8 +6102,6 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, ""); /* Use icon background at low opacity to highlight, but still contrasting with area TH_TEXT. */ copy_v3_v3_uchar(but->col, report_icon_color); @@ -6382,8 +6226,6 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, ""); /* UI_BTYPE_ROUNDBOX's bg color is set in but->col. */ UI_GetThemeColorType4ubv(TH_INFO_WARNING, SPACE_INFO, but->col); @@ -6400,8 +6242,6 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0, - 0, ""); /* Use icon background at low opacity to highlight, but still contrasting with area TH_TEXT. */ @@ -6430,8 +6270,6 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, compat_error_msg); UI_GetThemeColorType4ubv(TH_INFO_WARNING_TEXT, SPACE_INFO, but->col); but->col[3] = 255; /* This theme color is RBG only, so have to set alpha here. */ @@ -6448,8 +6286,6 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C) nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, compat_error_msg); UI_block_emboss_set(block, previous_emboss); @@ -6710,7 +6546,7 @@ void uiTemplateNodeSocket(uiLayout *layout, bContext * /*C*/, const float color[ * Eventually it should be possible to use theme colors for this purpose, * but this requires a better design for extendable color palettes in user preferences. */ uiBut *but = uiDefBut( - block, UI_BTYPE_NODE_SOCKET, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, nullptr, 0, 0, 0, 0, ""); + block, UI_BTYPE_NODE_SOCKET, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, nullptr, 0, 0, ""); rgba_float_to_uchar(but->col, color); UI_block_align_end(block); diff --git a/source/blender/editors/interface/interface_utils.cc b/source/blender/editors/interface/interface_utils.cc index 60a3275f1c5..239636df688 100644 --- a/source/blender/editors/interface/interface_utils.cc +++ b/source/blender/editors/interface/interface_utils.cc @@ -246,7 +246,7 @@ uiBut *uiDefAutoButR(uiBlock *block, char text[256]; SNPRINTF(text, IFACE_("%d items"), RNA_property_collection_length(ptr, prop)); but = uiDefBut( - block, UI_BTYPE_LABEL, 0, text, x, y, width, height, nullptr, 0, 0, 0, 0, nullptr); + block, UI_BTYPE_LABEL, 0, text, x, y, width, height, nullptr, 0, 0, nullptr); UI_but_flag_enable(but, UI_BUT_DISABLED); break; } diff --git a/source/blender/editors/interface/views/abstract_view_item.cc b/source/blender/editors/interface/views/abstract_view_item.cc index db60846e319..ac9bd2f3b6b 100644 --- a/source/blender/editors/interface/views/abstract_view_item.cc +++ b/source/blender/editors/interface/views/abstract_view_item.cc @@ -200,8 +200,6 @@ void AbstractViewItem::add_rename_button(uiBlock &block) view.get_rename_buffer().data(), 1.0f, view.get_rename_buffer().size(), - 0, - 0, ""); /* Gotta be careful with what's passed to the `arg1` here. Any view data will be freed once the diff --git a/source/blender/editors/interface/views/grid_view.cc b/source/blender/editors/interface/views/grid_view.cc index 5ce1739139c..23aa5994aa1 100644 --- a/source/blender/editors/interface/views/grid_view.cc +++ b/source/blender/editors/interface/views/grid_view.cc @@ -154,8 +154,6 @@ void AbstractGridViewItem::add_grid_tile_button(uiBlock &block) nullptr, 0, 0, - 0, - 0, ""); view_item_but_->view_item = reinterpret_cast(this); @@ -300,8 +298,6 @@ void BuildOnlyVisibleButtonsHelper::add_spacer_button(uiBlock &block, const int nullptr, 0, 0, - 0, - 0, ""); remaining_rows -= row_count_this_iter; } @@ -425,8 +421,6 @@ void PreviewGridItem::build_grid_tile(uiLayout &layout) const nullptr, 0, 0, - 0, - 0, ""); /* Draw icons that are not previews or images as normal icons with a fixed icon size. Otherwise * they will be upscaled to the button size. Should probably be done by the widget code. */ diff --git a/source/blender/editors/interface/views/tree_view.cc b/source/blender/editors/interface/views/tree_view.cc index f9cd8da1e3f..7c295f2c69f 100644 --- a/source/blender/editors/interface/views/tree_view.cc +++ b/source/blender/editors/interface/views/tree_view.cc @@ -301,7 +301,7 @@ void AbstractTreeViewItem::add_treerow_button(uiBlock &block) { /* For some reason a width > (UI_UNIT_X * 2) make the layout system use all available width. */ view_item_but_ = (uiButViewItem *)uiDefBut( - &block, UI_BTYPE_VIEW_ITEM, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, nullptr, 0, 0, 0, 0, ""); + &block, UI_BTYPE_VIEW_ITEM, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, nullptr, 0, 0, ""); view_item_but_->view_item = reinterpret_cast(this); view_item_but_->draw_height = unpadded_item_height(); @@ -319,13 +319,13 @@ void AbstractTreeViewItem::add_indent(uiLayout &row) const uiLayout *subrow = uiLayoutRow(&row, true); uiLayoutSetFixedSize(subrow, true); - uiDefBut(block, UI_BTYPE_SEPR, 0, "", 0, 0, indent_width(), 0, nullptr, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_SEPR, 0, "", 0, 0, indent_width(), 0, nullptr, 0.0, 0.0, ""); /* Indent items without collapsing icon some more within their parent. Makes it clear that they * are actually nested and not just a row at the same level without a chevron. */ if (!is_collapsible()) { uiDefBut( - block, UI_BTYPE_SEPR, 0, "", 0, 0, UI_TREEVIEW_INDENT, 0, nullptr, 0.0, 0.0, 0, 0, ""); + block, UI_BTYPE_SEPR, 0, "", 0, 0, UI_TREEVIEW_INDENT, 0, nullptr, 0.0, 0.0, ""); } /* Restore. */ @@ -374,8 +374,6 @@ void AbstractTreeViewItem::add_collapse_chevron(uiBlock &block) const nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, collapse_chevron_click_fn, nullptr, nullptr); UI_but_flag_disable(but, UI_BUT_UNDO); diff --git a/source/blender/editors/space_buttons/buttons_texture.cc b/source/blender/editors/space_buttons/buttons_texture.cc index c9bb13fed0d..4a3f7bba611 100644 --- a/source/blender/editors/space_buttons/buttons_texture.cc +++ b/source/blender/editors/space_buttons/buttons_texture.cc @@ -518,8 +518,6 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void * /*a nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); UI_but_funcN_set(but, template_texture_select, MEM_dupallocN(user), nullptr); @@ -689,8 +687,6 @@ void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Show texture in texture tab")); UI_but_func_set(but, template_texture_show, diff --git a/source/blender/editors/space_clip/clip_buttons.cc b/source/blender/editors/space_clip/clip_buttons.cc index dc9cf84759f..e7436100b55 100644 --- a/source/blender/editors/space_clip/clip_buttons.cc +++ b/source/blender/editors/space_clip/clip_buttons.cc @@ -128,8 +128,7 @@ void uiTemplateMovieClip( if (clip) { uiLayout *row = uiLayoutRow(layout, false); uiBlock *block = uiLayoutGetBlock(row); - uiDefBut( - block, UI_BTYPE_LABEL, 0, IFACE_("File Path:"), 0, 19, 145, 19, nullptr, 0, 0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("File Path:"), 0, 19, 145, 19, nullptr, 0, 0, ""); row = uiLayoutRow(layout, false); uiLayout *split = uiLayoutSplit(row, 0.0f, false); @@ -190,8 +189,6 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname) scopes, 0, 0, - 0, - 0, ""); /* Resize grip. */ @@ -463,8 +460,6 @@ void uiTemplateMarker(uiLayout *layout, nullptr, 0, 0, - 0, - 0, ""); return; @@ -535,8 +530,6 @@ void uiTemplateMarker(uiLayout *layout, nullptr, 0, 0, - 0, - 0, ""); uiBut *bt = uiDefButF(block, UI_BTYPE_NUM, @@ -578,8 +571,6 @@ void uiTemplateMarker(uiLayout *layout, nullptr, 0, 0, - 0, - 0, ""); bt = uiDefButF(block, UI_BTYPE_NUM, @@ -621,8 +612,6 @@ void uiTemplateMarker(uiLayout *layout, nullptr, 0, 0, - 0, - 0, ""); bt = uiDefButF(block, UI_BTYPE_NUM, @@ -664,8 +653,6 @@ void uiTemplateMarker(uiLayout *layout, nullptr, 0, 0, - 0, - 0, ""); bt = uiDefButF(block, UI_BTYPE_NUM, diff --git a/source/blender/editors/space_file/file_draw.cc b/source/blender/editors/space_file/file_draw.cc index e2bfa364176..d595a267ef8 100644 --- a/source/blender/editors/space_file/file_draw.cc +++ b/source/blender/editors/space_file/file_draw.cc @@ -403,8 +403,6 @@ static uiBut *file_add_icon_but(const SpaceFile *sfile, nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, nullptr); UI_but_label_alpha_factor_set(but, dimmed ? 0.3f : 1.0f); if (file->asset) { @@ -543,8 +541,6 @@ static void file_add_preview_drag_but(const SpaceFile *sfile, nullptr, 0.0, 0.0, - 0, - 0, nullptr); file_but_enable_drag(but, sfile, file, path, preview_image, icon, scale); @@ -1304,8 +1300,6 @@ void file_draw_list(const bContext *C, ARegion *region) nullptr, 0, 0, - 0, - 0, nullptr); UI_but_dragflag_enable(drag_but, UI_BUT_DRAG_FULL_BUT); file_but_enable_drag(drag_but, sfile, file, path, nullptr, icon, UI_SCALE_FAC); @@ -1346,8 +1340,6 @@ void file_draw_list(const bContext *C, ARegion *region) params->renamefile, 1.0f, float(sizeof(params->renamefile)), - 0, - 0, ""); UI_but_func_rename_set(but, renamebutton_cb, file); UI_but_flag_enable(but, UI_BUT_NO_UTF8); /* allow non utf8 names */ diff --git a/source/blender/editors/space_graph/graph_buttons.cc b/source/blender/editors/space_graph/graph_buttons.cc index 980e0a3a324..896744c3017 100644 --- a/source/blender/editors/space_graph/graph_buttons.cc +++ b/source/blender/editors/space_graph/graph_buttons.cc @@ -1105,8 +1105,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, TIP_("Add a Driver Variable to keep track of an input used by the driver")); UI_but_func_set(but, driver_add_var_cb, driver, nullptr); @@ -1176,8 +1174,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Invalid variable name, click here for details")); UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, nullptr); /* XXX: reports? */ } @@ -1194,8 +1190,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Delete target variable")); UI_but_func_set(but, driver_delete_var_cb, driver, dvar); UI_block_emboss_set(block, UI_EMBOSS); @@ -1271,8 +1265,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, TIP_("Force updates of dependencies - Only use this if drivers are not updating correctly")); UI_but_func_set(but, driver_update_flags_cb, fcu, nullptr); } diff --git a/source/blender/editors/space_image/image_buttons.cc b/source/blender/editors/space_image/image_buttons.cc index 00a3a5a641c..3da057bc197 100644 --- a/source/blender/editors/space_image/image_buttons.cc +++ b/source/blender/editors/space_image/image_buttons.cc @@ -103,8 +103,6 @@ static void ui_imageuser_slot_menu(bContext * /*C*/, uiLayout *layout, void *ima nullptr, 0.0, 0.0, - 0, - 0, ""); } @@ -211,8 +209,6 @@ static void ui_imageuser_layer_menu(bContext * /*C*/, uiLayout *layout, void *rn nullptr, 0.0, 0.0, - 0, - 0, ""); BKE_image_release_renderresult(scene, image); @@ -285,8 +281,6 @@ static void ui_imageuser_pass_menu(bContext * /*C*/, uiLayout *layout, void *rnd nullptr, 0.0, 0.0, - 0, - 0, ""); BLI_freelistN(&added_passes); @@ -326,8 +320,6 @@ static void ui_imageuser_view_menu_rr(bContext * /*C*/, uiLayout *layout, void * nullptr, 0.0, 0.0, - 0, - 0, ""); uiItemS(layout); @@ -376,8 +368,6 @@ static void ui_imageuser_view_menu_multiview(bContext * /*C*/, uiLayout *layout, nullptr, 0.0, 0.0, - 0, - 0, ""); uiItemS(layout); diff --git a/source/blender/editors/space_node/link_drag_search.cc b/source/blender/editors/space_node/link_drag_search.cc index 9a636524cef..dd87aa5c268 100644 --- a/source/blender/editors/space_node/link_drag_search.cc +++ b/source/blender/editors/space_node/link_drag_search.cc @@ -472,8 +472,6 @@ static uiBlock *create_search_popup_block(bContext *C, ARegion *region, void *ar nullptr, 0, 0, - 0, - 0, nullptr); const int2 offset = {0, -UI_UNIT_Y}; diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 52da2ab8ad6..83370531f68 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -1744,8 +1744,6 @@ static void node_socket_draw_nested(const bContext &C, nullptr, 0, 0, - 0, - 0, nullptr); UI_but_func_tooltip_set( @@ -2245,8 +2243,6 @@ static void node_draw_panels(bNodeTree &ntree, const bNode &node, uiBlock &block nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); /* Panel label. */ @@ -2261,8 +2257,6 @@ static void node_draw_panels(bNodeTree &ntree, const bNode &node, uiBlock &block nullptr, 0, 0, - 0, - 0, ""); if (node.flag & NODE_MUTED) { UI_but_flag_enable(but, UI_BUT_INACTIVE); @@ -2281,8 +2275,6 @@ static void node_draw_panels(bNodeTree &ntree, const bNode &node, uiBlock &block nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); UI_but_func_pushed_state_set(but, [&state](const uiBut &) { return state.is_collapsed(); }); UI_but_func_set( @@ -2382,8 +2374,6 @@ static void node_add_unsupported_compositor_operation_error_message_button(const nullptr, 0, 0, - 0, - 0, TIP_(node.typeinfo->realtime_compositor_unsupported_message)); UI_block_emboss_set(&block, UI_EMBOSS); } @@ -2441,8 +2431,6 @@ static void node_add_error_message_button(const TreeDrawContext &tree_draw_ctx, nullptr, 0, 0, - 0, - 0, nullptr); UI_but_func_tooltip_set(but, node_errors_tooltip_fn, tooltip_data, [](void *arg) { MEM_delete(static_cast(arg)); @@ -2847,8 +2835,6 @@ static void node_draw_extra_info_row(const bNode &node, nullptr, 0, 0, - 0, - 0, extra_info_row.tooltip); if (extra_info_row.tooltip_fn != nullptr) { UI_but_func_tooltip_set(but_icon, @@ -2873,8 +2859,6 @@ static void node_draw_extra_info_row(const bNode &node, nullptr, 0, 0, - 0, - 0, ""); if (node.flag & NODE_MUTED) { @@ -3099,8 +3083,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, node_toggle_button_cb, @@ -3126,8 +3108,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, node_toggle_button_cb, @@ -3149,8 +3129,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); UI_block_emboss_set(&block, UI_EMBOSS); } @@ -3169,8 +3147,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); /* Selection implicitly activates the node. */ const char *operator_idname = is_active ? "NODE_OT_deactivate_viewer" : "NODE_OT_select"; @@ -3205,8 +3181,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); UI_but_func_set(but, @@ -3230,8 +3204,6 @@ static void node_draw_basis(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); if (node.flag & NODE_MUTED) { UI_but_flag_enable(but, UI_BUT_INACTIVE); @@ -3436,8 +3408,6 @@ static void node_draw_hidden(const bContext &C, nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); UI_but_func_set(but, @@ -3461,8 +3431,6 @@ static void node_draw_hidden(const bContext &C, nullptr, 0, 0, - 0, - 0, ""); /* Outline. */ @@ -3879,20 +3847,8 @@ static void reroute_node_draw( const int x = BLI_rctf_cent_x(&node.runtime->totr) - (width / 2); const int y = node.runtime->totr.ymax; - uiBut *label_but = uiDefBut(&block, - UI_BTYPE_LABEL, - 0, - showname, - x, - y, - width, - short(NODE_DY), - nullptr, - 0, - 0, - 0, - 0, - nullptr); + uiBut *label_but = uiDefBut( + &block, UI_BTYPE_LABEL, 0, showname, x, y, width, short(NODE_DY), nullptr, 0, 0, nullptr); UI_but_drawflag_disable(label_but, UI_BUT_TEXT_LEFT); } diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc index 5421b33fb33..946e848626f 100644 --- a/source/blender/editors/space_node/node_select.cc +++ b/source/blender/editors/space_node/node_select.cc @@ -1416,8 +1416,6 @@ static uiBlock *node_find_menu(bContext *C, ARegion *region, void *arg_op) nullptr, 0, 0, - 0, - 0, nullptr); /* Move it downwards, mouse over button. */ diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc index 8ee502f00f5..3a0474ce8ab 100644 --- a/source/blender/editors/space_node/node_templates.cc +++ b/source/blender/editors/space_node/node_templates.cc @@ -604,8 +604,6 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); } @@ -629,8 +627,6 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Add node to input")); argN = (NodeLinkArg *)MEM_dupallocN(arg); @@ -690,8 +686,6 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Remove nodes connected to the input")); UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), POINTER_FROM_INT(UI_NODE_LINK_REMOVE)); @@ -706,8 +700,6 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ nullptr, 0.0, 0.0, - 0.0, - 0.0, TIP_("Disconnect nodes connected to the input")); UI_but_funcN_set( but, ui_node_link, MEM_dupallocN(arg), POINTER_FROM_INT(UI_NODE_LINK_DISCONNECT)); @@ -814,8 +806,6 @@ static void ui_node_draw_panel(uiLayout &layout, nullptr, 0.0, 0.0, - 0.0, - 0.0, ""); UI_but_drawflag_enable(but, UI_BUT_TEXT_LEFT | UI_BUT_NO_TOOLTIP); UI_but_func_set(but, node_panel_toggle_button_cb, &panel_state, &ntree); diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 8c5d84105b1..4e393ccc078 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -1780,8 +1780,6 @@ static void outliner_draw_userbuts(uiBlock *block, nullptr, 0.0, 0.0, - 0, - 0, TIP_("Number of users of this data-block")); UI_but_flag_enable(bt, but_flag); @@ -1847,8 +1845,6 @@ static void outliner_draw_overrides_rna_buts(uiBlock *block, nullptr, 0.0f, 0.0f, - 0.0f, - 0.0f, ""); UI_but_flag_enable(but, UI_BUT_REDALERT); continue; @@ -1870,8 +1866,6 @@ static void outliner_draw_overrides_rna_buts(uiBlock *block, nullptr, 0, 0, - 0, - 0, ""); continue; } @@ -2112,8 +2106,6 @@ static void outliner_buttons(const bContext *C, (void *)te->name, 1.0, float(len), - 0, - 0, ""); UI_but_func_rename_set(bt, namebutton_fn, tselem); @@ -2211,8 +2203,6 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, nullptr, 0.0, 0.0, - 0.0, - 0.0, tip); UI_but_func_set(but, outliner_mode_toggle_fn, tselem, nullptr); UI_but_flag_enable(but, UI_BUT_DRAG_LOCK); @@ -2301,8 +2291,6 @@ static void outliner_draw_warning_tree_element(uiBlock *block, nullptr, 0.0, 0.0, - 0.0, - 0.0, warning_msg.c_str()); /* No need for undo here, this is a pure info widget. */ UI_but_flag_disable(but, UI_BUT_UNDO); @@ -2976,8 +2964,6 @@ static bool tselem_draw_icon(uiBlock *block, nullptr, 0.0, 0.0, - 0.0, - 0.0f, (data.drag_id && ID_IS_LINKED(data.drag_id)) ? data.drag_id->lib->filepath : ""); } diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 3482e1933c7..edaef705ea8 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -856,8 +856,6 @@ static uiBlock *merged_element_search_menu(bContext *C, ARegion *region, void *d nullptr, 0, 0, - 0, - 0, nullptr); /* Center the menu on the cursor */ diff --git a/source/blender/editors/space_sequencer/sequencer_channels_draw.cc b/source/blender/editors/space_sequencer/sequencer_channels_draw.cc index 46bd575a14a..1412bd2f657 100644 --- a/source/blender/editors/space_sequencer/sequencer_channels_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_channels_draw.cc @@ -256,8 +256,6 @@ static void draw_channel_labels(const SeqChannelDrawContext *context, nullptr, 0, 0, - 0, - 0, nullptr); } } diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc index 9225259d5d3..def1cb3a65f 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc @@ -55,8 +55,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Center-align column headers. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -79,8 +77,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align indices. */ UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT); @@ -112,8 +108,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Integers. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -134,8 +128,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Integers. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -162,8 +154,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Floats. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -184,8 +174,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); UI_but_drawflag_disable(but, UI_BUT_ICON_LEFT); } @@ -229,8 +217,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); break; } @@ -248,8 +234,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); break; } @@ -266,8 +250,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); break; } @@ -289,8 +271,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); } } @@ -316,8 +296,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Floats. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -346,8 +324,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Floats. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -377,8 +353,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Right-align Floats. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -415,8 +389,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { nullptr, 0, 0, - 0, - 0, nullptr); /* Center alignment. */ UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); diff --git a/source/blender/editors/space_view3d/view3d_buttons.cc b/source/blender/editors/space_view3d/view3d_buttons.cc index 2a424afa035..ba051a381d5 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.cc +++ b/source/blender/editors/space_view3d/view3d_buttons.cc @@ -481,8 +481,6 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float nullptr, 0, 0, - 0, - 0, ""); return; } @@ -547,7 +545,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float else { c = IFACE_("Median:"); } - uiDefBut(block, UI_BTYPE_LABEL, 0, c, 0, yi -= buth, butw, buth, nullptr, 0, 0, 0, 0, ""); + uiDefBut(block, UI_BTYPE_LABEL, 0, c, 0, yi -= buth, butw, buth, nullptr, 0, 0, ""); UI_block_align_begin(block); @@ -659,8 +657,6 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float nullptr, 0.0, 0.0, - 0, - 0, ""); /* customdata layer added on demand */ but = uiDefButF(block, @@ -737,8 +733,6 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float nullptr, 0.0, 0.0, - 0, - 0, ""); /* customdata layer added on demand */ but = uiDefButF(block, @@ -1215,8 +1209,6 @@ static void v3d_object_dimension_buts(bContext *C, uiLayout *layout, View3D *v3d nullptr, 0, 0, - 0, - 0, ""); UI_block_align_begin(block); const float lim = FLT_MAX; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index ea62e0d261c..c94127bdd15 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3749,8 +3749,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void nullptr, 0, 0, - 0, - 0, TIP_("Reload file with execution of Python scripts enabled")); UI_but_func_set( but, [block](bContext &C) { wm_block_autorun_warning_reload_with_scripts(&C, block); }); @@ -3768,8 +3766,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void nullptr, 0, 0, - 0, - 0, TIP_("Enable scripts")); UI_but_func_set(but, [block](bContext &C) { wm_block_autorun_warning_enable_scripts(&C, block); }); @@ -3789,8 +3785,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void nullptr, 0, 0, - 0, - 0, TIP_("Continue using file without Python scripts")); UI_but_func_set(but, wm_block_autorun_warning_ignore, block, nullptr); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -3933,21 +3927,8 @@ static void save_file_forwardcompat_cancel(bContext *C, void *arg_block, void * static void save_file_forwardcompat_cancel_button(uiBlock *block, wmGenericCallback *post_action) { - uiBut *but = uiDefIconTextBut(block, - UI_BTYPE_BUT, - 0, - ICON_NONE, - IFACE_("Cancel"), - 0, - 0, - 0, - UI_UNIT_Y, - nullptr, - 0, - 0, - 0, - 0, - ""); + uiBut *but = uiDefIconTextBut( + block, UI_BTYPE_BUT, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, ""); UI_but_func_set(but, save_file_forwardcompat_cancel, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); } @@ -3990,8 +3971,6 @@ static void save_file_forwardcompat_overwrite_button(uiBlock *block, nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, save_file_forwardcompat_overwrite, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -4020,8 +3999,6 @@ static void save_file_forwardcompat_saveas_button(uiBlock *block, wmGenericCallb nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, save_file_forwardcompat_saveas, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -4185,21 +4162,8 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat static void wm_block_file_close_cancel_button(uiBlock *block, wmGenericCallback *post_action) { - uiBut *but = uiDefIconTextBut(block, - UI_BTYPE_BUT, - 0, - ICON_NONE, - IFACE_("Cancel"), - 0, - 0, - 0, - UI_UNIT_Y, - nullptr, - 0, - 0, - 0, - 0, - ""); + uiBut *but = uiDefIconTextBut( + block, UI_BTYPE_BUT, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, ""); UI_but_func_set(but, wm_block_file_close_cancel, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); } @@ -4218,8 +4182,6 @@ static void wm_block_file_close_discard_button(uiBlock *block, wmGenericCallback nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, wm_block_file_close_discard, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); @@ -4243,8 +4205,6 @@ static void wm_block_file_close_save_button(uiBlock *block, nullptr, 0, 0, - 0, - 0, ""); UI_but_func_set(but, wm_block_file_close_save, block, post_action); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); diff --git a/source/blender/windowmanager/intern/wm_operators.cc b/source/blender/windowmanager/intern/wm_operators.cc index f53307ec459..c82e20de76e 100644 --- a/source/blender/windowmanager/intern/wm_operators.cc +++ b/source/blender/windowmanager/intern/wm_operators.cc @@ -1110,8 +1110,6 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *region, void *arg) nullptr, 0.0, 0.0, - 0, - 0, ""); #endif uiBut *but = uiDefSearchButO_ptr(block, @@ -1139,8 +1137,6 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *region, void *arg) nullptr, 0, 0, - 0, - 0, nullptr); /* Move it downwards, mouse over button. */ @@ -1570,14 +1566,12 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ nullptr, 0, 0, - 0, - 0, ""); uiLayoutColumn(col, false); } cancel_but = uiDefBut( - col_block, UI_BTYPE_BUT, 0, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, 0, 0, ""); + col_block, UI_BTYPE_BUT, 0, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, ""); if (!windows_layout) { uiLayoutColumn(col, false); @@ -1592,8 +1586,6 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ nullptr, 0, 0, - 0, - 0, ""); } @@ -1951,8 +1943,6 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *region, void *userdat nullptr, 0, 0, - 0, - 0, nullptr); /* Move it downwards, mouse over button. */ diff --git a/source/blender/windowmanager/intern/wm_splash_screen.cc b/source/blender/windowmanager/intern/wm_splash_screen.cc index f66ba255742..0c519cc5271 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.cc +++ b/source/blender/windowmanager/intern/wm_splash_screen.cc @@ -66,7 +66,7 @@ static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, UI_block_emboss_set(block, UI_EMBOSS_NONE); uiBut *but = uiDefBut( - block, UI_BTYPE_LABEL, 0, label, 0, y, x, UI_UNIT_Y, nullptr, 0, 0, 0, 0, nullptr); + block, UI_BTYPE_LABEL, 0, label, 0, y, x, UI_UNIT_Y, nullptr, 0, 0, nullptr); UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT);