Python API docs wrong for TransformOrientationSlot?

The Python API docs for TransformOrientationSlot say that these objects have a “type” attribute, which is supposed to be an enum in [‘GLOBAL’, ‘LOCAL’, ‘NORMAL’, ‘GIMBAL’, ‘VIEW’, ‘CURSOR’], default ‘GLOBAL’.

This seems to be wrong, if I make a new blend file, go into edit mode on the default cube, select the top face and hit the + button to create a new transform orientation like so:


And then I go to the scripting tab and run the following, I’m seeing a “.type” value of “Face” for one of the TransformOrientationSlot’s, seen here:

PYTHON INTERACTIVE CONSOLE 3.10.2 (main, Jan 27 2022, 08:34:43) [MSC v.1928 64 bit (AMD64)]

Builtin Modules:       bpy,, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports:   from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D =

>>> [thing[1].type for thing in list(bpy.context.scene.transform_orientation_slots.items())]

Why am I seeing this value? The docs surrounding TransformOrientation, TransformOrientationSlot, and bpy.types.Scene.transform_orientation_slots are just really, really bad. Would be good to see an explanation of how these work, how they’re intended to be used, and to have docs that actually match the way they behave…

When I make a new orientation from a different face on the cube, I don’t see the new orientation listed in the orientation_slots either, there are still only 4 listed, and the “type” of the first one now has a different name:

>>> [thing[1].type for thing in list(bpy.context.scene.transform_orientation_slots.items())]
['Face.001', 'DEFAULT', 'DEFAULT', 'DEFAULT']

What is going on here?

1 Like

I asked about this a long time ago (here), and never got a good answer. How should these things work?

Bump. Actually looking for some help here! So I’m the developer of Mesh Align Plus, and I’ve always had a super hard time getting help with issues during the development process. I have a limited amount of time to spend building the addon, so I would really like to spend my time where it counts adding features, and not stuck wading through docs or core code just to make some progress on this issue :frowning:

Bump again, is anyone here?

Bump another time. Super sad times :frowning:

Consider reporting a bug to the tracker.

There seems to be some weird API behavior that is worth fixing, there might not be any way to do what you want with the current behavior.

1 Like

Thanks for the suggestion, I’ll make some time to do that during this development cycle.

Also you’re a legend, I tell people about your history with cycles all the time :slight_smile: