r/blenderpython • u/B4-711 • Mar 06 '20
how to delete transform_orientation
I crreated a temporary transform orientation:
bpy.ops.transform.create_orientation(name='tmp')
but calling
bpy.ops.transform.delete_orientation()
doesn't work:
File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\modules\bpy\ops.py", line 199, in call ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Operator bpy.ops.transform.delete_orientation.poll() failed, context is incorrect
How can I delete the new transform_orientation?
1
Upvotes
View all comments
Show parent comment
1
u/B4-711 Mar 07 '20
Yeah I also found those posts but they don't work with 2.82
throws an error.
Also read that it is different if run in a script vs. as an add-on because the add-on already has context infos or something.
I guess I'll try to understand what it does and recreate that. I find the whole scripting to be rather confusing. It seems to be more like remote controlling than actual programming.