[Bf-blender-cvs] [e8142ad7dca] blender2.8: Cleanup: quiet warnings
Campbell Barton
noreply at git.blender.org
Fri Jun 1 11:50:08 CEST 2018
Commit: e8142ad7dca13930b02d413da5aa7ebd9bbcaadd
Author: Campbell Barton
Date: Fri Jun 1 11:48:53 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe8142ad7dca13930b02d413da5aa7ebd9bbcaadd
Cleanup: quiet warnings
===================================================================
M source/blender/draw/engines/workbench/workbench_data.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list