Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-21 03:40:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-21 03:45:01 +0300
commit9dde3e42a7c5bc5f7896fd30e2b3a5859d6857bf (patch)
tree11a429ba243ab47e526b7a9dbae5b3527edcb0c3 /source/blender/makesrna/intern/rna_space.c
parentc8dfe763e521925c59522dc0abe0539727052807 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
1 files changed, 2 insertions, 0 deletions
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);