diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index cd2e2794192..f83088dd4d5 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1778,6 +1778,8 @@ enum { UI_ITEM_R_CHECKBOX_INVERT = 1 << 12, /** Don't add a real decorator item, just blank space. */ UI_ITEM_R_FORCE_BLANK_DECORATE = 1 << 13, + /* Even create the property split layout if there's no name to show there. */ + UI_ITEM_R_SPLIT_EMPTY_NAME = 1 << 14, }; #define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 49ce1315e7f..2ca4af32bc2 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1969,7 +1969,7 @@ void uiItemFullR(uiLayout *layout, * Keep using 'use_prop_sep' instead of disabling it entirely because * we need the ability to have decorators still. */ bool use_prop_sep_split_label = use_prop_sep; - bool forbid_single_col = false; + bool use_split_empty_name = (flag & UI_ITEM_R_SPLIT_EMPTY_NAME); #ifdef UI_PROP_DECORATE struct { @@ -2082,7 +2082,7 @@ void uiItemFullR(uiLayout *layout, use_prop_sep_split_label = false; /* For checkboxes we make an expection: We allow showing them in a split row even without * label. It typically relates to its neighbor items, so no need for an extra label. */ - forbid_single_col = true; + use_split_empty_name = true; } } #endif @@ -2120,7 +2120,7 @@ void uiItemFullR(uiLayout *layout, } #endif /* UI_PROP_DECORATE */ - if ((name[0] == '\0') && !forbid_single_col) { + if ((name[0] == '\0') && !use_split_empty_name) { /* Ensure we get a column when text is not set. */ layout = uiLayoutColumn(layout_row ? layout_row : layout, true); layout->space = 0;