Workbench: StudioLight: Fix worldspace rotation
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user