bpy.ops.transform.rotate works incorrect if not set "orient_matrix" value #66527

Closed
opened 2019-07-07 14:31:46 +02:00 by Ivan Vostrikov · 13 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce 920M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.81

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-05 16:36, hash: 699193713f
Worked: 2.79b

Short description of error
If not set "orient_matrix" value in operator bpy.ops.transform.rotate, object will be rotate in anoter side. This works for GLOBAL and LOCAL orientations.

For Example:

bpy.ops.transform.rotate(value=0.349066, orient_axis='Y', orient_type='GLOBAL', orient_matrix_type='GLOBAL', constraint_axis=(False, True, False)) must rotate global Y axis 20 degrees.
In fact: Rotate global Y axis -20 degrees.

or

bpy.ops.transform.rotate(value=0.349066, orient_axis='X', orient_type='LOCAL', orient_matrix_type='LOCAL', constraint_axis=(True, False, False)) must rotate local X axis 20 degrees.
In fact: Rotate local X axis -20 degrees.

Exact steps for others to reproduce the error

  • Create New File and select Default Cube
  • Open Python Console
  • Run: bpy.ops.transform.rotate(value=0.349066, orient_axis='Y', orient_type='GLOBAL', orient_matrix_type='GLOBAL', constraint_axis=(False, True, False)) or bpy.ops.transform.rotate(value=0.349066, orient_axis='X', orient_type='LOCAL', orient_matrix_type='LOCAL', constraint_axis=(True, False, False))
  • Check result cube's rotation
**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce 920M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 416.81 **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-05 16:36, hash: `699193713f` Worked: 2.79b **Short description of error** If not set "orient_matrix" value in operator bpy.ops.transform.rotate, object will be rotate in anoter side. This works for GLOBAL and LOCAL orientations. For Example: bpy.ops.transform.rotate(value=0.349066, orient_axis='Y', orient_type='GLOBAL', orient_matrix_type='GLOBAL', constraint_axis=(False, True, False)) **must rotate global Y axis 20 degrees.** **In fact: Rotate global Y axis -20 degrees.** **or** bpy.ops.transform.rotate(value=0.349066, orient_axis='X', orient_type='LOCAL', orient_matrix_type='LOCAL', constraint_axis=(True, False, False)) **must rotate local X axis 20 degrees.** **In fact: Rotate local X axis -20 degrees.** **Exact steps for others to reproduce the error** - Create New File and select Default Cube - Open Python Console - Run: bpy.ops.transform.rotate(value=0.349066, orient_axis='Y', orient_type='GLOBAL', orient_matrix_type='GLOBAL', constraint_axis=(False, True, False)) **or** bpy.ops.transform.rotate(value=0.349066, orient_axis='X', orient_type='LOCAL', orient_matrix_type='LOCAL', constraint_axis=(True, False, False)) - Check result cube's rotation
Author

Added subscriber: @IvanVostrikov

Added subscriber: @IvanVostrikov
Member

Added subscribers: @ideasman42, @lichtwerk

Added subscribers: @ideasman42, @lichtwerk
Campbell Barton was assigned by Philipp Oeser 2019-07-08 13:43:38 +02:00
Member

Confirmed.

@ideasman42 : just guessing: not sure why we are inverting spacemtx in initTransformOrientation here (if skipped for for the non-modal case, issue seems to be gone...)?

Confirmed. @ideasman42 : just guessing: not sure why we are inverting `spacemtx` in `initTransformOrientation` [here ](https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/transform/transform_orientations.c$518) (if skipped for for the non-modal case, issue seems to be gone...)?

Added subscriber: @LajosMagvasi

Added subscriber: @LajosMagvasi

Also If you set the orientation type to VIEW and dont set the orient_matrix, it will use the global orientation.

Also If you set the orientation type to VIEW and dont set the orient_matrix, it will use the global orientation.
Campbell Barton was unassigned by Dalai Felinto 2019-12-23 16:33:54 +01:00

Added subscriber: @richeyrose

Added subscriber: @richeyrose

This bug was gone in 2.90.1 but has now reappeared in 2.91 and is even worse as setting orient_matrix no longer prevents the bug. As far as I can tell there is now no way to get transform.rotate to output a none reversed rotation without inverting a value.

This bug was gone in 2.90.1 but has now reappeared in 2.91 and is even worse as setting orient_matrix no longer prevents the bug. As far as I can tell there is now no way to get transform.rotate to output a none reversed rotation without inverting a value.
Member

In #66527#1061767, @richeyrose wrote:
This bug was gone in 2.90.1 but has now reappeared in 2.91 and is even worse as setting orient_matrix no longer prevents the bug. As far as I can tell there is now no way to get transform.rotate to output a none reversed rotation without inverting a value.

Since this is a bit of a new situation in 2.91, could you make a new report for this?
(you can also reference this report in the new one, but overall, this will make it easier to track progress, thx)

> In #66527#1061767, @richeyrose wrote: > This bug was gone in 2.90.1 but has now reappeared in 2.91 and is even worse as setting orient_matrix no longer prevents the bug. As far as I can tell there is now no way to get transform.rotate to output a none reversed rotation without inverting a value. Since this is a bit of a new situation in 2.91, could you make a new report for this? (you can also reference this report in the new one, but overall, this will make it easier to track progress, thx)

Done https://developer.blender.org/T83092
Now effects Mesh edit and pose mode as well. Ouch

Done https://developer.blender.org/T83092 Now effects Mesh edit and pose mode as well. Ouch
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Can not replicate the issue. Checked with 2.93 LTS and 3.0.0 (d1e1d6c491). Issue was there in 2.92 release.

Hi @lichtwerk , are you able to reproduce the problem with 2.93LTS?

Output:

2.92 2.93LTS
prog.PNG prog.PNG
Can not replicate the issue. Checked with 2.93 LTS and 3.0.0 (`d1e1d6c491`). Issue was there in 2.92 release. Hi @lichtwerk , are you able to reproduce the problem with 2.93LTS? Output: |2.92|2.93LTS| | -- | -- | |![prog.PNG](https://archive.blender.org/developer/F10233658/prog.PNG)|![prog.PNG](https://archive.blender.org/developer/F10233663/prog.PNG)|
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Philipp Oeser self-assigned this 2021-07-23 13:12:56 +02:00
Member

This was fixed by 92743cc895, so bug is not in 2.93 nor 3.0.
Will close as resolved (but of course feel free to comment again if issues persist)

This was fixed by 92743cc895, so bug is not in 2.93 nor 3.0. Will close as resolved (but of course feel free to comment again if issues persist)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#66527
No description provided.