Commit: 1965db2be20f3ea3cdafcfe55dd8708897f850a9
Author: Clément Foucault
Date: Fri Nov 30 02:02:21 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB1965db2be20f3ea3cdafcfe55dd8708897f850a9
Workbench: StudioLight: Fix worldspace rotation
===================================================================
M source/blender/draw/engines/workbench/workbench_studiolight.c
===================================================================
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]);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs