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-06-01 12:48:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-01 12:49:10 +0300
commite8142ad7dca13930b02d413da5aa7ebd9bbcaadd (patch)
treefb9487056d4a394bb8d9165ee1245d47c665f8a6
parent46830913696d2cd28a055df32adaf2791a4b4444 (diff)
Cleanup: quiet warnings
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index 81cca2dcf5f..3e369c4f429 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -60,14 +60,16 @@ void workbench_private_data_get_light_direction(WORKBENCH_PrivateData *wpd, floa
WORKBENCH_UBO_World *wd = &wpd->world_data;
float view_matrix[4][4];
DRW_viewport_matrix_get(view_matrix, DRW_MAT_VIEW);
- WORKBENCH_UBO_Light *light = &wd->lights[0];
-
- mul_v3_mat3_m4v3(light->light_direction_vs, view_matrix, light_direction);
- light->light_direction_vs[3] = 0.0f;
- copy_v3_fl(light->specular_color, 1.0f);
- light->energy = 1.0f;
- copy_v4_v4(wd->light_direction_vs, light->light_direction_vs);
- wd->num_lights = 1;
+
+ {
+ WORKBENCH_UBO_Light *light = &wd->lights[0];
+ mul_v3_mat3_m4v3(light->light_direction_vs, view_matrix, light_direction);
+ light->light_direction_vs[3] = 0.0f;
+ copy_v3_fl(light->specular_color, 1.0f);
+ light->energy = 1.0f;
+ copy_v4_v4(wd->light_direction_vs, light->light_direction_vs);
+ wd->num_lights = 1;
+ }
if (STUDIOLIGHT_ORIENTATION_CAMERA_ENABLED(wpd)) {
int light_index = 0;