Post #1867: This is not easy but possible. Try this code in Custom tab:

📋 Metadata

🏷️ Tags

custom-tab transform-orientation advanced solved

  • Custom Tab
  • Command Tab
  • Python Scripting
  • Pie Menu Editor

💬 Content

This is not easy but possible. Try this code in Custom tab:

tool = C.workspace.tools.from_space_view3d_mode(C.mode); ori = dict(Global=0, Transform=1, Move=1, Rotate=2, Shear=2, Scale=3, Resize=3); L.column(align=True).prop(C.scene.transform_orientation_slots[ori.get(tool.name, 0)], "type", expand=True)

If you want to set some value (eg. ‘GLOBAL’) use this code in Command tab:

value = 'GLOBAL'; tool = C.workspace.tools.from_space_view3d_mode(C.mode); ori = dict(Global=0, Transform=1, Move=1, Rotate=2, Shear=2, Scale=3, Resize=3); C.scene.transform_orientation_slots[ori.get(tool.name, 0)].type = value

🔗 View on Blender Artists