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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-04-19 16:22:30 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-04-19 16:22:30 +0300
commit733fd3eabd840a1bc60f5ec8960330dca3cbc347 (patch)
tree078f1c75f3b50d5515713f18c4eeba53bdfd3fce /source/blender/draw/engines
parent8a2f0058aeab48e837561719a5dda27985d99ee5 (diff)
Workbench: removed per collection object color
Will be part of the collection manager where per collection the ob->col can be set. This currently depends on DepsGraph + CollectionManager. I removed it for now so the code won't influence development
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/workbench/workbench_engine.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c13
-rw-r--r--source/blender/draw/engines/workbench/workbench_private.h1
3 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index 2b6c95e301f..c93ff5cb2e9 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -48,8 +48,6 @@ static void workbench_layer_collection_settings_create(RenderEngine *UNUSED(engi
BLI_assert(props &&
props->type == IDP_GROUP &&
props->subtype == IDP_GROUP_SUB_ENGINE_RENDER);
- float default_object_color[3] = {1.0, 1.0, 1.0};
- BKE_collection_engine_property_add_float_array(props, "object_color", default_object_color, 3);
}
/* Note: currently unused, we may want to register so we can see this when debugging the view. */
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 1338fccf61f..ea866169e96 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -57,16 +57,7 @@ static uint get_material_hash(const float color[3])
static const float* get_material_solid_color(WORKBENCH_PrivateData *wpd, Object *ob)
{
- IDProperty *props = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_NONE, RE_engine_id_BLENDER_WORKBENCH);
- switch (wpd->drawtype_object_color)
- {
- default:
- case V3D_OBJECT_COLOR_COLLECTION:
- return BKE_collection_engine_property_value_get_float_array(props, "object_color");
-
- case V3D_OBJECT_COLOR_OBJECT:
- return ob->col;
- }
+ return ob->col;
}
void workbench_materials_engine_init(void)
@@ -110,7 +101,6 @@ void workbench_materials_cache_init(WORKBENCH_Data *vedata)
View3D *v3d = DCS->v3d;
if (v3d) {
- wpd->drawtype_object_color = v3d->drawtype_object_color;
#if 0
/* TODO: switch implementation when OB_TEXTURE is implemented */
switch (v3d->drawtype) {
@@ -124,7 +114,6 @@ void workbench_materials_cache_init(WORKBENCH_Data *vedata)
#endif
}
else {
- wpd->drawtype_object_color = V3D_OBJECT_COLOR_COLLECTION;
wpd->drawtype_lighting = V3D_LIGHTING_STUDIO;
}
}
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index b2d79ec39ee..4a4014c70a0 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -56,7 +56,6 @@ typedef struct WORKBENCH_PrivateData {
DRWShadingGroup *shadeless_shgrp;
struct GHash *material_hash;
- short drawtype_object_color;
short drawtype_lighting;
} WORKBENCH_PrivateData; /* Transient data */