Page MenuHome

Rotate with "R" key or using bpy.ops.transform.rotate produces inverted rotation. Effects Object, Mesh Edit and Pose Mode
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: rB0f45cab862b8
Worked: version: 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: rB3e85bb34d0d7

Short description of error

If a numeric figure is entered after pressing "R" to rotate an object by a set amount in object mode or if bpy.ops.transform.rotate is called via a script or the console, objects rotate in the opposite direction to intended.

A similar bug was present in 2.80 https://developer.blender.org/T66527 but this had a workaround that if you set the orient matrix in a script it would force the rotation to be in the correct direction. This workaround no longer works.

This bug also effects mesh edit mode and pose mode!!!

Exact steps for others to reproduce the error

Launch startup file.
Go into top view
Go into orthographic mode.
Select default cube
Press "R" on the keyboard and enter 15

Result:
Cube rotates -15 degrees rather than +15 degrees.

Alternatively:

Launch startup file.
Go into top view
Go into orthographic mode.
Select default cube

then in the console:

bpy.ops.transform.rotate(value=0.261799)

Result:
Cube rotates -15 degrees rather than +15 degrees.

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from Developers.Nov 27 2020, 1:44 PM

Value-wise, this is actually the other way around:
In 2.90, if you type in R+15, the cube would turn clockwise, but the value for Rotation Z would actually end up -15
In 2.91, if you type in R+15, the cube would turn counter-clockwise, but the value for Rotation Z would actually end up 15

@Germano Cavalcante (mano-wii), you have done some changes here, I guess this is now expected behavior?

Germano Cavalcante (mano-wii) changed the task status from Needs Information from Developers to Confirmed.Nov 27 2020, 1:58 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

This change was intentional in order to maintain a standard for viewport orientation.
The Z axis of the viewport matrix points to the other side, so this negative angle is like expected.
Before there were conditions and adjustments depending on the transform mode and this was becoming a growing snowball.
But I'll take a look again and see if I can work around this problem in another way.