From 9dde3e42a7c5bc5f7896fd30e2b3a5859d6857bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 21 Dec 2018 11:40:47 +1100 Subject: 3D View: add object color drawing option Has some advantages over existing options. - Using material links color to rendering with no way to vary colors if objects share a material. - Random gives no control, objects may randomly have the same color, duplicating an object often changes it's color. --- source/blender/makesrna/intern/rna_space.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesrna/intern/rna_space.c') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index b77eed67d21..ef1b60272f3 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -284,6 +284,7 @@ static const EnumPropertyItem rna_enum_viewport_lighting_items[] = { static const EnumPropertyItem rna_enum_shading_color_type_items[] = { {V3D_SHADING_SINGLE_COLOR, "SINGLE", 0, "Single", "Show scene in a single color"}, {V3D_SHADING_MATERIAL_COLOR, "MATERIAL", 0, "Material", "Show material color"}, + {V3D_SHADING_OBJECT_COLOR, "OBJECT", 0, "Object", "Show object color"}, {V3D_SHADING_RANDOM_COLOR, "RANDOM", 0, "Random", "Show random object color"}, {V3D_SHADING_TEXTURE_COLOR, "TEXTURE", 0, "Texture", "Show texture"}, {0, NULL, 0, NULL, NULL} @@ -819,6 +820,7 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf( if (shading->type == OB_SOLID) { RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR); RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_MATERIAL_COLOR); + RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_OBJECT_COLOR); RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_RANDOM_COLOR); if (shading->light != V3D_LIGHTING_MATCAP) { RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_TEXTURE_COLOR); -- cgit v1.2.3