Don't depend on context for transform_orientation enum

New current_orientation property that returns the current transform orientation data (if any)
New UI elements to rename and remove custom orientation (visible only when needed)
This commit is contained in:
2009-10-14 21:05:35 +00:00
parent 7bed5e35b4
commit 1da4a06fc7
3 changed files with 21 additions and 17 deletions

View File

@@ -1333,12 +1333,11 @@ class VIEW3D_PT_transform_orientations(bpy.types.Panel):
col.itemR(view, "transform_orientation")
col.itemO("tfm.create_orientation", text="Create")
# orientation_index = view.__rna__.properties["transform_orientation"].items[view.transform_orientation].value
#
# if orientation_index >= 4:
# orientation = context.scene.orientations[orientation_index - 4]
# col.itemR(orientation, "name")
col.itemO("tfm.delete_orientation", text="Delete")
orientation = view.current_orientation
if orientation:
col.itemR(orientation, "name")
col.itemO("tfm.delete_orientation", text="Delete")
# Operators