diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 03:40:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-21 03:45:01 +0300 |
commit | 9dde3e42a7c5bc5f7896fd30e2b3a5859d6857bf (patch) | |
tree | 11a429ba243ab47e526b7a9dbae5b3527edcb0c3 /source/blender/draw/engines/workbench/workbench_forward.c | |
parent | c8dfe763e521925c59522dc0abe0539727052807 (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/draw/engines/workbench/workbench_forward.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_forward.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 7a0a5e20864..ca02cc2b5ea 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -528,7 +528,9 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob) /* Fallback from not drawn OB_TEXTURE mode or just OB_SOLID mode */ if (!is_drawn) { - if (ELEM(wpd->shading.color_type, V3D_SHADING_SINGLE_COLOR, V3D_SHADING_RANDOM_COLOR)) { + if (ELEM(wpd->shading.color_type, + V3D_SHADING_SINGLE_COLOR, V3D_SHADING_OBJECT_COLOR, V3D_SHADING_RANDOM_COLOR)) + { /* No material split needed */ struct GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { |