📋 Metadata
- Author: roaoao
- Date: 2016-05-14 06:37:43
- Type:
answer - Reply to: post_00161
💬 Content
Leafar:
when I use this one, it works but I can not use ‘Undo’ later and I don´t know why either.
bpy.ops.align.y()
That’s weird. It works for me in both current (1.9.0) and upcoming versions.
I’m not sure if it will help but try to replace that operator with this:
#Align Y
class AlignY(bpy.types.Operator):
bl_idname = "align.y"
bl_label = "Align Y"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
bpy.ops.transform.resize(value=(1, 0, 1), constraint_axis=(False, True, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
return {'FINISHED'}
Then press F8 (default hotkey) to reload the add-on or just restart blender.