Refactor: Unify vertex and sculpt colors into new
color attribute system.
This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors. Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.
Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).
Note: this commit does not include vertex paint mode,
which is a separate patch, see:
https://developer.blender.org/D14179
Differential Revision: https://developer.blender.org/D12587
Ref D12587
This commit is contained in:
@@ -346,6 +346,22 @@ static void face_corner_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
uiItemR(layout, ptr, "loop_mapping", 0, IFACE_("Mapping"), ICON_NONE);
|
||||
}
|
||||
|
||||
static void vert_vcol_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
{
|
||||
uiLayout *layout = panel->layout;
|
||||
|
||||
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
|
||||
uiLayoutSetActive(layout,
|
||||
RNA_enum_get(ptr, "data_types_verts") &
|
||||
(DT_TYPE_MPROPCOL_VERT | DT_TYPE_MLOOPCOL_VERT));
|
||||
|
||||
uiItemR(layout, ptr, "layers_vcol_vert_select_src", 0, IFACE_("Layer Selection"), ICON_NONE);
|
||||
uiItemR(layout, ptr, "layers_vcol_vert_select_dst", 0, IFACE_("Layer Mapping"), ICON_NONE);
|
||||
}
|
||||
|
||||
static void face_corner_vcol_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
{
|
||||
uiLayout *layout = panel->layout;
|
||||
@@ -354,10 +370,12 @@ static void face_corner_vcol_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
|
||||
uiLayoutSetActive(layout, RNA_enum_get(ptr, "data_types_loops") & DT_TYPE_VCOL);
|
||||
uiLayoutSetActive(layout,
|
||||
RNA_enum_get(ptr, "data_types_loops") &
|
||||
(DT_TYPE_MPROPCOL_LOOP | DT_TYPE_MLOOPCOL_LOOP));
|
||||
|
||||
uiItemR(layout, ptr, "layers_vcol_select_src", 0, IFACE_("Layer Selection"), ICON_NONE);
|
||||
uiItemR(layout, ptr, "layers_vcol_select_dst", 0, IFACE_("Layer Mapping"), ICON_NONE);
|
||||
uiItemR(layout, ptr, "layers_vcol_loop_select_src", 0, IFACE_("Layer Selection"), ICON_NONE);
|
||||
uiItemR(layout, ptr, "layers_vcol_loop_select_dst", 0, IFACE_("Layer Mapping"), ICON_NONE);
|
||||
}
|
||||
|
||||
static void face_corner_uv_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
@@ -426,6 +444,9 @@ static void panelRegister(ARegionType *region_type)
|
||||
modifier_subpanel_register(
|
||||
region_type, "vertex_vgroup", "Vertex Groups", NULL, vertex_vgroup_panel_draw, vertex_panel);
|
||||
|
||||
modifier_subpanel_register(
|
||||
region_type, "vert_vcol", "Colors", NULL, vert_vcol_panel_draw, vertex_panel);
|
||||
|
||||
modifier_subpanel_register(
|
||||
region_type, "edge", "", edge_panel_draw_header, edge_panel_draw, panel_type);
|
||||
|
||||
@@ -437,7 +458,7 @@ static void panelRegister(ARegionType *region_type)
|
||||
panel_type);
|
||||
modifier_subpanel_register(region_type,
|
||||
"face_corner_vcol",
|
||||
"Vertex Colors",
|
||||
"Colors",
|
||||
NULL,
|
||||
face_corner_vcol_panel_draw,
|
||||
face_corner_panel);
|
||||
|
||||
Reference in New Issue
Block a user