UI: Gray out Scene Auto-Masking option if equivalent Brush option is used #102971 #106126
|
@ -896,7 +896,7 @@ void UI_but_dragflag_enable(uiBut *but, int flag);
|
|||
void UI_but_dragflag_disable(uiBut *but, int flag);
|
||||
|
||||
void UI_but_disable(uiBut *but, const char *disabled_hint);
|
||||
void UI_but_inactive(uiBut *but, const char *disabled_hint);
|
||||
void UI_but_set_disabled_hint(uiBut *but, const char *disabled_hint);
|
||||
|
||||
void UI_but_type_set_menu_from_pulldown(uiBut *but);
|
||||
|
||||
|
|
|
@ -4716,7 +4716,7 @@ static uiBut *ui_def_but_rna(uiBlock *block,
|
|||
}
|
||||
|
||||
if (but->rnapoin.data && RNA_property_is_inactive_info(&but->rnapoin, prop, &info)) {
|
||||
UI_but_inactive(but, info);
|
||||
UI_but_set_disabled_hint(but, info);
|
||||
}
|
||||
|
||||
if (proptype == PROP_POINTER) {
|
||||
|
@ -5908,20 +5908,8 @@ void UI_but_dragflag_disable(uiBut *but, int flag)
|
|||
but->dragflag &= ~flag;
|
||||
}
|
||||
|
||||
void UI_but_inactive(uiBut *but, const char *inactive_hint)
|
||||
void UI_but_set_disabled_hint(uiBut *but, const char *disabled_hint)
|
||||
{
|
||||
/* Only one inactive hint at a time currently. Don't override the previous one here. */
|
||||
if (but->disabled_info && but->disabled_info[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
but->disabled_info = inactive_hint;
|
||||
}
|
||||
|
||||
void UI_but_disable(uiBut *but, const char *disabled_hint)
|
||||
{
|
||||
UI_but_flag_enable(but, UI_BUT_DISABLED);
|
||||
|
||||
/* Only one disabled hint at a time currently. Don't override the previous one here. */
|
||||
if (but->disabled_info && but->disabled_info[0]) {
|
||||
return;
|
||||
|
@ -5930,6 +5918,13 @@ void UI_but_disable(uiBut *but, const char *disabled_hint)
|
|||
but->disabled_info = disabled_hint;
|
||||
}
|
||||
|
||||
void UI_but_disable(uiBut *but, const char *disabled_hint)
|
||||
{
|
||||
UI_but_flag_enable(but, UI_BUT_DISABLED);
|
||||
|
||||
UI_but_set_disabled_hint(but, disabled_hint);
|
||||
}
|
||||
|
||||
void UI_but_type_set_menu_from_pulldown(uiBut *but)
|
||||
{
|
||||
BLI_assert(but->type == UI_BTYPE_PULLDOWN);
|
||||
|
|
Loading…
Reference in New Issue