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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-30 04:02:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-30 04:02:36 +0300
commit1965db2be20f3ea3cdafcfe55dd8708897f850a9 (patch)
treeae5d5c2211f863f6bb69b0729505fd653c8260f7 /source/blender/draw
parent6a4f5f6eb44b3dacff51ae8c152689e8ddf6e7b2 (diff)
Workbench: StudioLight: Fix worldspace rotation
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/workbench/workbench_studiolight.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_studiolight.c b/source/blender/draw/engines/workbench/workbench_studiolight.c
index f0a166105ab..7b348cfd8ec 100644
--- a/source/blender/draw/engines/workbench/workbench_studiolight.c
+++ b/source/blender/draw/engines/workbench/workbench_studiolight.c
@@ -38,8 +38,8 @@ void studiolight_update_world(WORKBENCH_PrivateData *wpd, StudioLight *studiolig
DRW_viewport_matrix_get(view_matrix, DRW_MAT_VIEW);
if (USE_WORLD_ORIENTATION(wpd)) {
- axis_angle_to_mat4_single(rot_matrix, 'Y', -wpd->shading.studiolight_rot_z);
- mul_m4_m4m4(rot_matrix, rot_matrix, view_matrix);
+ axis_angle_to_mat4_single(rot_matrix, 'Z', -wpd->shading.studiolight_rot_z);
+ mul_m4_m4m4(rot_matrix, view_matrix, rot_matrix);
swap_v3_v3(rot_matrix[2], rot_matrix[1]);
negate_v3(rot_matrix[2]);
}