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-25 16:59:15 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-04-25 16:59:15 +0300
commit5f97331ffc2987295c09e3a54dc60095c2b21db0 (patch)
tree17a77d877de4e4cf9c6c8504401206ec91dd9a5e /source/blender/draw/engines/workbench/workbench_engine.c
parentc392f2448c2ecd4a52b89fda12e0730a01c6416d (diff)
Workbench: Added studio lighting to view layer
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_engine.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_engine.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index 689bdd4111b..4c95eaf7b3b 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -51,6 +51,28 @@ static void workbench_layer_collection_settings_create(RenderEngine *UNUSED(engi
BKE_collection_engine_property_add_float(props, "random_object_color_saturation", 0.5f);
BKE_collection_engine_property_add_float(props, "random_object_color_value", 0.9f);
+
+}
+
+static void workbench_view_layer_settings_create(RenderEngine *UNUSED(engine), IDProperty *props)
+{
+ BLI_assert(props &&
+ props->type == IDP_GROUP &&
+ props->subtype == IDP_GROUP_SUB_ENGINE_RENDER);
+
+ const float diffuse_x_pos[3] = {0.8, 0.8, 1.0};
+ const float diffuse_x_neg[3] = {0.8, 0.8, 1.0};
+ const float diffuse_y_pos[3] = {1.0, 1.0, 1.0};
+ const float diffuse_y_neg[3] = {0.8, 0.8, 1.0};
+ const float diffuse_z_pos[3] = {1.0, 1.0, 1.0};
+ const float diffuse_z_neg[3] = {0.5, 0.5, 0.5};
+
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_x_pos", diffuse_x_pos, 3);
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_x_neg", diffuse_x_neg, 3);
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_y_pos", diffuse_y_pos, 3);
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_y_neg", diffuse_y_neg, 3);
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_z_pos", diffuse_z_pos, 3);
+ BKE_collection_engine_property_add_float_array(props, "diffuse_light_z_neg", diffuse_z_neg, 3);
}
/* Note: currently unused, we may want to register so we can see this when debugging the view. */
@@ -58,7 +80,7 @@ static void workbench_layer_collection_settings_create(RenderEngine *UNUSED(engi
RenderEngineType DRW_engine_viewport_workbench_type = {
NULL, NULL,
WORKBENCH_ENGINE, N_("Workbench"), RE_INTERNAL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, &workbench_layer_collection_settings_create, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, &workbench_layer_collection_settings_create, &workbench_view_layer_settings_create,
&draw_engine_workbench_solid,
{NULL, NULL, NULL}
};