How to get transform orientations data?

How to get existing in scene custom TO’s data? I already asked on Blender Artists python support (no any reply) and Blender Stack Exchange (1 misunderstanding reply, at least I guess so ).

Everywhere people talk about this['Scene'].transform_orientation_slots.

Logically (at least for me… ), it should return existing TO’s (slots mean more than one… ). But it not return TO’s.

If I try to get it as list list(['Scene'].transform_orientation_slots) it return some 4 items (always 4, no matter how many custom TO’s exist) [['Scene'].transform_orientation_slots[0],['Scene'].transform_orientation_slots[1],['Scene'].transform_orientation_slots[2],['Scene'].transform_orientation_slots[3]]

First one [0] return current active TO data.['Scene'].transform_orientation_slots[0].type

Others [1],[2],[3] return some useless ‘DEFAULT’ something['Scene'].transform_orientation_slots[1].type

So yeah … how to get damn existing TO’s data? (not just currently active one)

I cant find out across the internet. Already tried all forms of googling. Looks like no one .except me, need such or I am (again) stupidest boy in the world and I don’t understand obvious for others things…

Can anyone help, please?

I already thinking about to astart digging inside Bledner source code to find how this TO dropdown menu deal with TO’s data. But I have never work with sources before so finding something inside sources looks for me a bit to *** heavy…

Got better reply on Blender Stack Exchange, user Pavan Bhadaja point me to two years ago asked question topic Blender 2.8 API how to get a list of custom transform orientations

Unexpected workaround “solution”… Set transform_orientation_slots[0].type to a non existent value like '' and get then error message with list of TO’s names TypeError: bpy_struct: item.attr = val: enum "" not found in ('GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR', 'Cub', 'Cube', 'Cube.001', 'Cube.002')

Even if it so weird I may use it to make things work. But it not work for me. When I do so in Blender console it work. When I do same in my addon function - it said that “Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting TransformOrientationSlot.type”


So I have now two new questions:

  1. Haw anyone ideas how to force this weird solution work?
  2. Can anyone advice me where to go to write about all this issues and maybe force some future changes in API to implement much proper ways to access this data? If someone asked for this two years ago and today things are same bad… perhaps it need to change this state.