Cleanup: Remove unnecessary a1 and a2 arguments for some UI functions

This commit is contained in:
Hans Goudey
2024-02-29 22:13:28 -05:00
parent 0e2fed5a57
commit 121ded625f
9 changed files with 11 additions and 103 deletions
@@ -5348,8 +5348,6 @@ static void draw_setting_widget(bAnimContext *ac,
static_cast<int *>(ptr),
0,
0,
0,
0,
tooltip);
break;
@@ -5366,8 +5364,6 @@ static void draw_setting_widget(bAnimContext *ac,
static_cast<short *>(ptr),
0,
0,
0,
0,
tooltip);
break;
@@ -5384,8 +5380,6 @@ static void draw_setting_widget(bAnimContext *ac,
static_cast<char *>(ptr),
0,
0,
0,
0,
tooltip);
break;
}
@@ -1166,8 +1166,6 @@ uiBut *uiDefIconButI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconButBitI(uiBlock *block,
int type,
@@ -1181,8 +1179,6 @@ uiBut *uiDefIconButBitI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconButS(uiBlock *block,
int type,
@@ -1195,8 +1191,6 @@ uiBut *uiDefIconButS(uiBlock *block,
short *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconButBitS(uiBlock *block,
int type,
@@ -1210,8 +1204,6 @@ uiBut *uiDefIconButBitS(uiBlock *block,
short *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconButBitC(uiBlock *block,
int type,
@@ -1225,8 +1217,6 @@ uiBut *uiDefIconButBitC(uiBlock *block,
char *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconButR(uiBlock *block,
int type,
@@ -1322,8 +1312,6 @@ uiBut *uiDefIconTextButI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip);
uiBut *uiDefIconTextButR(uiBlock *block,
int type,
+8 -30
View File
@@ -4387,8 +4387,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);
}
else {
@@ -5291,8 +5289,6 @@ static uiBut *uiDefIconButBit(uiBlock *block,
void *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
const int bitIdx = findBitIndex(bit);
@@ -5310,8 +5306,8 @@ static uiBut *uiDefIconButBit(uiBlock *block,
poin,
min,
max,
a1,
a2,
0.0f,
0.0f,
tip);
}
@@ -5326,8 +5322,6 @@ uiBut *uiDefIconButI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconBut(block,
@@ -5341,8 +5335,8 @@ uiBut *uiDefIconButI(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
0.0f,
0.0f,
tip);
}
uiBut *uiDefIconButBitI(uiBlock *block,
@@ -5357,8 +5351,6 @@ uiBut *uiDefIconButBitI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconButBit(block,
@@ -5373,8 +5365,6 @@ uiBut *uiDefIconButBitI(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
tip);
}
uiBut *uiDefIconButS(uiBlock *block,
@@ -5388,8 +5378,6 @@ uiBut *uiDefIconButS(uiBlock *block,
short *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconBut(block,
@@ -5403,8 +5391,8 @@ uiBut *uiDefIconButS(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
0.0f,
0.0f,
tip);
}
uiBut *uiDefIconButBitS(uiBlock *block,
@@ -5419,8 +5407,6 @@ uiBut *uiDefIconButBitS(uiBlock *block,
short *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconButBit(block,
@@ -5435,8 +5421,6 @@ uiBut *uiDefIconButBitS(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
tip);
}
uiBut *uiDefIconButBitC(uiBlock *block,
@@ -5451,8 +5435,6 @@ uiBut *uiDefIconButBitC(uiBlock *block,
char *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconButBit(block,
@@ -5467,8 +5449,6 @@ uiBut *uiDefIconButBitC(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
tip);
}
uiBut *uiDefIconButR(uiBlock *block,
@@ -5608,8 +5588,6 @@ uiBut *uiDefIconTextButI(uiBlock *block,
int *poin,
float min,
float max,
float a1,
float a2,
const char *tip)
{
return uiDefIconTextBut(block,
@@ -5624,8 +5602,8 @@ uiBut *uiDefIconTextButI(uiBlock *block,
(void *)poin,
min,
max,
a1,
a2,
0.0f,
0.0f,
tip);
}
uiBut *uiDefIconTextButR(uiBlock *block,
@@ -3413,25 +3413,11 @@ void uiItemV(uiLayout *layout, const char *name, int icon, int argval)
const int w = ui_text_icon_width(layout, name, icon, false);
if (icon && name[0]) {
uiDefIconTextButI(block,
UI_BTYPE_BUT,
argval,
icon,
name,
0,
0,
w,
UI_UNIT_Y,
retvalue,
0.0,
0.0,
0,
-1,
"");
uiDefIconTextButI(
block, UI_BTYPE_BUT, argval, icon, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, "");
}
else if (icon) {
uiDefIconButI(
block, UI_BTYPE_BUT, argval, icon, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, -1, "");
uiDefIconButI(block, UI_BTYPE_BUT, argval, icon, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, "");
}
else {
uiDefButI(
@@ -1121,8 +1121,6 @@ static void ui_template_list_layout_draw(const bContext *C,
&(ui_list->filter_flag),
0,
0,
0,
0,
TIP_("Hide filtering options"));
UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */
@@ -1138,8 +1136,6 @@ static void ui_template_list_layout_draw(const bContext *C,
&dyn_data->resize,
0.0,
0.0,
0,
0,
"");
UI_but_func_set(but, [ui_list](bContext &C) { uilist_resize_update(&C, ui_list); });
}
@@ -1178,8 +1174,6 @@ static void ui_template_list_layout_draw(const bContext *C,
&(ui_list->filter_flag),
0,
0,
0,
0,
TIP_("Show filtering options"));
UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */
@@ -1195,8 +1189,6 @@ static void ui_template_list_layout_draw(const bContext *C,
&dyn_data->resize,
0.0,
0.0,
0,
0,
"");
UI_but_func_set(but, [ui_list](bContext &C) { uilist_resize_update(&C, ui_list); });
}
@@ -3243,8 +3243,6 @@ void uiTemplatePreview(uiLayout *layout,
&ui_preview->height,
UI_UNIT_Y,
UI_UNIT_Y * 50.0f,
0.0f,
0.0f,
"");
/* add buttons */
@@ -4027,8 +4025,6 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname
&hist->height,
UI_UNIT_Y,
UI_UNIT_Y * 20.0f,
0.0f,
0.0f,
"");
}
@@ -4089,8 +4085,6 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname)
&scopes->wavefrm_height,
UI_UNIT_Y,
UI_UNIT_Y * 20.0f,
0.0f,
0.0f,
"");
}
@@ -4151,8 +4145,6 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna
&scopes->vecscope_height,
UI_UNIT_Y,
UI_UNIT_Y * 20.0f,
0.0f,
0.0f,
"");
}
@@ -206,8 +206,6 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
&scopes->track_preview_height,
UI_UNIT_Y,
UI_UNIT_Y * 20.0f,
0.0f,
0.0f,
"");
}
@@ -442,8 +440,6 @@ void uiTemplateMarker(uiLayout *layout,
&cb->marker_flag,
0,
0,
1,
0,
tip);
UI_but_funcN_set(bt, marker_update_cb, cb, nullptr);
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
@@ -1151,8 +1151,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&layer->flag,
0,
0,
0,
0,
TIP_("Use view layer for rendering"));
UI_but_func_set(bt, restrictbutton_r_lay_fn, tselem->id, nullptr);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
@@ -1382,8 +1380,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&(bone->flag),
0,
0,
0,
0,
TIP_("Restrict selection in the 3D View\n"
"* Shift to set children"));
UI_but_func_set(bt, restrictbutton_bone_select_fn, ob->data, bone);
@@ -1408,8 +1404,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&(ebone->flag),
0,
0,
0,
0,
TIP_("Restrict visibility in the 3D View\n"
"* Shift to set children"));
UI_but_func_set(bt, restrictbutton_ebone_visibility_fn, arm, ebone);
@@ -1430,8 +1424,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&(ebone->flag),
0,
0,
0,
0,
TIP_("Restrict selection in the 3D View\n"
"* Shift to set children"));
UI_but_func_set(bt, restrictbutton_ebone_select_fn, arm, ebone);
@@ -1456,8 +1448,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&gpl->flag,
0,
0,
0,
0,
TIP_("Restrict visibility in the 3D View"));
UI_but_func_set(bt, restrictbutton_gp_layer_flag_fn, id, gpl);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
@@ -1477,8 +1467,6 @@ static void outliner_draw_restrictbuts(uiBlock *block,
&gpl->flag,
0,
0,
0,
0,
TIP_("Restrict editing of strokes and keyframes in this layer"));
UI_but_func_set(bt, restrictbutton_gp_layer_flag_fn, id, gpl);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
@@ -1815,8 +1803,6 @@ static void outliner_draw_userbuts(uiBlock *block,
&id->flag,
0,
0,
0,
0,
tip);
UI_but_func_set(bt, restrictbutton_id_user_toggle, id, nullptr);
UI_but_flag_enable(bt, but_flag);
@@ -376,8 +376,6 @@ static void modifier_panel_header(const bContext *C, Panel *panel)
&apply_on_spline_always_off_hack,
0.0,
0.0,
0.0,
0.0,
RPT_("Apply on Spline"));
UI_but_disable(but,
"This modifier can only deform filled curve/surface, not the control points");
@@ -402,8 +400,6 @@ static void modifier_panel_header(const bContext *C, Panel *panel)
&apply_on_spline_always_on_hack,
0.0,
0.0,
0.0,
0.0,
RPT_("Apply on Spline"));
UI_but_disable(but,
"This modifier can only deform control points, not the filled curve/surface");