delete transform edges / faces list

is there a way to delete all the transform edge added in N panel ?

right now only way is to do it manually which can take a long time if you have a lot of these new transform

thanks

anyone knows if this exist or not ?

should be possible cause doing by hand takes time when you have like 50 new edges transform !

thanks

what are transform edges / faces?

You mean transform orientations?

There is no RNA method to remove them, so you really need to use the operator:

 bpy.ops.transform.delete_orientation()

It deletes the active TO of the context area (must be type View 3D).

You may set the active via Area.space_data.transform_orientation = ‘the_name’, but beware, if a custom one is called “GLOBAL” and you try to set that as active, it will switch to the builtin Global instead.

As a workaround, you could temp change the name to something unique (retrieve the TO object via space_data.current_orientation, check if it’s not None, otherwise it’s a builtin one), then use this unique name to set .transform_orientation.

so need to select object go into edit mode
change area
then how do you select the new transform and delete
don’t care what the name is just delete all the new one to clear it quickly

thanks

began something simple but not working yet




	
import bpy 
	
from bpy_extras.object_utils import object_data_add
from bpy_extras.object_utils import AddObjectHelper
	
	
	
for area in bpy.context.screen.areas:
	
	print ('area.type=',area.type)
	
	if area.type == 'VIEW_3D':
		r3d = area.spaces[0].region_3d
	
		# access viewport stuff here, e.g.
		print(r3d.perspective_matrix)
#		bpy.ops.transform.delete_orientation()
#		print ( 'deleted')

	
	
print ()
	
print ()
	
	
print ( 'do the transform  ricky1')
print ()
	
bpy.ops.transform.create_orientation(name = "ricky1", overwrite = True)
	
	
bpy.context.scene.orientations[-1].matrix = (((1.0, 0.0, 0.0),
(0.0, -1.0, 0.0),
(0.0, 0.0, -0.5))) 
	
	
###

for t in bpy.context.scene.orientations:
	
	bpy.context.space_data.transform_orientation = t.name
	print ('  here    t,name=',t.name  )
	
	override = {
		'context':context,
		'area':context.area,
		'window':context.window,
		'screen':context.screen,
		'scene':context.scene,
		'region':context.region,
		'name':t.name
		}
	
	bpy.ops.transform.delete_orientation(override)
	
	
	
#	bpy.context.space_data.transform_orientation = 'Edge.002'
	
	
####
	
	
class TRANSFORM_OT_clear_orientations(bpy.types.Operator):
	
	bl_idname = 'transform.clear_orientations'
	bl_label = 'Clear Transform Orientations'
	
	def execute(self,context):
	
		for t in context.scene.orientations:
			
			context.space_data.transform_orientation = t.name
			print ('  here    t,name=',t.name  )
			
			override = {
				'context':context,
				'area':context.area,
				'window':context.window,
				'screen':context.screen,
				'scene':context.scene,
				'region':context.region,
				'name':t.name
				}
	
			bpy.ops.transform.delete_orientation(override)
	
		return {"FINISHED"}
	
def register():
	
	bpy.utils.register_class(TRANSFORM_OT_clear_orientations)
	hotkey = bpy.context.window_manager.keyconfigs.active.keymaps['3D View'].keymap_items.new
	hotkey('transform.clear_orientations',type='T',shift=True,ctrl=True,value='PRESS')
	
	
	
	
print ()
print ( 'bpy.context.scene.orientations =',len(bpy.context.scene.orientations))
	
print ()
print ()
	
for j1 in range(len(bpy.context.scene.orientations)):
	
	print ( 'scene.orientations [',j1,']', bpy.context.scene.orientations[j1])
	print ( 'scene.orientations values [',j1,']', bpy.context.scene.orientations.values)
	
	name1=bpy.context.scene.orientations[j1].name
	print ('name1=',name1)
	
	print ( 'deleted')
	
print ()
	
	
	
	
print ( 'Delete transform  ricky1')
print ()
	
	



thanks

toward the end of test script there is one class which I suppose to work with ctrl Shfft T but it does not work
would be nice to see that one work

also you can directly create a new transform in one line
but then how do you select a new item in the list and delete it !

thanks