Node UI: Improved layout for the Shader Mapping node, to match UI guidelines better (top -> bottom layout).
Patch by Sebastian König. Thanks!
This commit is contained in:
parent
605910f060
commit
5f99f8bee7
@ -699,29 +699,37 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA
|
||||
|
||||
static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
|
||||
{
|
||||
uiLayout *row;
|
||||
|
||||
uiLayout *row, *col, *sub;
|
||||
|
||||
uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
|
||||
|
||||
uiItemL(layout, IFACE_("Location:"), ICON_NONE);
|
||||
row = uiLayoutRow(layout, TRUE);
|
||||
uiItemR(row, ptr, "translation", 0, "", ICON_NONE);
|
||||
|
||||
uiItemL(layout, IFACE_("Rotation:"), ICON_NONE);
|
||||
row = uiLayoutRow(layout, TRUE);
|
||||
uiItemR(row, ptr, "rotation", 0, "", ICON_NONE);
|
||||
|
||||
uiItemL(layout, IFACE_("Scale:"), ICON_NONE);
|
||||
row = uiLayoutRow(layout, TRUE);
|
||||
uiItemR(row, ptr, "scale", 0, "", ICON_NONE);
|
||||
|
||||
row = uiLayoutRow(layout, TRUE);
|
||||
uiItemR(row, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE);
|
||||
uiItemR(row, ptr, "min", 0, "", ICON_NONE);
|
||||
|
||||
row = uiLayoutRow(layout, TRUE);
|
||||
uiItemR(row, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE);
|
||||
uiItemR(row, ptr, "max", 0, "", ICON_NONE);
|
||||
row = uiLayoutRow(layout, FALSE);
|
||||
|
||||
col = uiLayoutColumn(row, TRUE);
|
||||
uiItemL(col, IFACE_("Location:"), ICON_NONE);
|
||||
uiItemR(col, ptr, "translation", 0, "", ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(row, TRUE);
|
||||
uiItemL(col, IFACE_("Rotation:"), ICON_NONE);
|
||||
uiItemR(col, ptr, "rotation", 0, "", ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(row, TRUE);
|
||||
uiItemL(col, IFACE_("Scale:"), ICON_NONE);
|
||||
uiItemR(col, ptr, "scale", 0, "", ICON_NONE);
|
||||
|
||||
row = uiLayoutRow(layout, FALSE);
|
||||
|
||||
col = uiLayoutColumn(row, TRUE);
|
||||
uiItemR(col, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE);
|
||||
sub = uiLayoutColumn(col, TRUE);
|
||||
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min"));
|
||||
uiItemR(sub, ptr, "min", 0, "", ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(row, TRUE);
|
||||
uiItemR(col, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE);
|
||||
sub = uiLayoutColumn(col, TRUE);
|
||||
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max"));
|
||||
uiItemR(sub, ptr, "max", 0, "", ICON_NONE);
|
||||
}
|
||||
|
||||
static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user