UI: Gray out Scene Auto-Masking option if equivalent Brush option is used #102971 #106126

Open
Henry-Chang wants to merge 11 commits from Henry-Chang/blender:gray-out-automasking into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 10 additions and 15 deletions
Showing only changes of commit 0a80f192b6 - Show all commits

View File

@ -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);

View File

@ -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);