Page MenuHome

3d cursor rotation_mode doesn't works with python
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10 pro
Graphics card: nvidia gtx 1080

Blender Version
Broken: version: 2.80 (sub 57), branch: master, commit date: 2019-04-16 06:07, hash: edc1b0167518, type: Release
build date: 15/04/2019, 23:25

Problem
When i was tried switch 3d cursor rotation_mode by python with command bpy.context.scene.rotation_mode = 'AXIS_ANGLE' this is didn't worked.

 >>> bpy.context.scene.rotation_mode = 'AXIS_ANGLE'
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'Scene' object has no attribute 'rotation_mode'

Event Timeline

You may need to use "bpy.context.scene.cursor.rotation_mode" , not "bpy.context.scene.rotation_mode" to set 3d cursor rotation_mode.
I can confirm it work from console input or script.

I feel strange because, when I change the cursor rotation mode, by 3d view right panel>view menu,

  • "info editor " record, as you discribe. "bpy.context.scene.rotation_mode = 'AXIS_ANGLE'" **

But if I input "bpy.context.scene.rotation_mode" from python console, it not work. and actually there seems not "rotation_mode" as scene property. (Autocomplete not show it)
there seems miss registration about info window?

Hey, Yeah you right it's work for me too - = "bpy.context.scene.cursor.rotation_mode"

I feel strange because, when I change the cursor rotation mode, by 3d view right panel>view menu,

yeah exactly it confused me too

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Apr 18 2019, 10:28 AM

I'll confirm this as the print does indeed seem to be wrong here.

This is a known bug and has been reported before. I can't find the report currently..

The issue is, that the data path is incorrect for these sub-properties.