How to get existing custom transform orientation data (actually I look for names, ideally as a list)?
I made topic on Blender Artists python support - no any reply. Maybe here someone knows a solution.
I found only method do read currently selected transform orientation by
bpy.data.scenes['Scene'].transform_orientation_slots[0].type
C.scene.transform_orientation_slots[0].custom_orientation.matrix
. For detailed answer look here : blender.stackexchange.com/a/156437/115433 $\endgroup$bpy.context.scene.transform_orientation_slots
looks more like some incompleted thing. If I printslots
as a list (not just [0]) - it alwaus give 4 (no matter how many custom TO's exist) items. bpy.data.scenes['Scene'].transform_orientation_slots[0], [1], [2], [3]. Whre [0] one return currently selected TO data, others return 'DEFAULT' something useless. But I want to read data of all custom TO's from under the hood without selecting them manually in TO menu... $\endgroup$slots[0].type
via console it works. But when I try do same via addon function (I will use to set enum fo addon UI) it not work. Said that "Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting TransformOrientationSlot.type" $\endgroup$try
out of function. Now problem are - staying out of function it executes only once when I enable addon so it not refresh list of TO's. Any Ideas how to workaround thisWriting to ID classes in this context is not allowed: Scene, Scene datablock, error setting TransformOrientationSlot.type
limitation? $\endgroup$