Page MenuHome

bpy.ops.transform.rotate() ignores orient_type
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 980/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-11 09:14, hash: rB1b6dd42803df
Worked: 2.83

Short description of error
Written like this in a script:

bpy.ops.transform.rotate(value=math.radians(90), orient_axis="X", orient_type='LOCAL')

This worked in 2.83, but with 2.90 it seems the operator always falls back to 'GLOBAL'.

I have found this
https://developer.blender.org/rBSc57e4418bb85aec8bd3615fd775b990badb43d30
but not sure if its relevant.

Exact steps for others to reproduce the error


This is a file with a short script to execute the operator.
It works just fine in 2.83 with the expected 'LOCAL' or 'NORMAL' results.

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Sep 14 2020, 7:50 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

The problem is that this operator is being called in a 2D context (without a 3D view).
So it is to be expected that it does not have a defined orientation (if the orientation was VIEW, which 3DView should the operator choose?).

But since it worked before, I will make it less restrictive and allow orientations like "LOCAL" and "NORMAL" to be calculated even in a 2D context.