Post #163: ![](https://blenderartists.org/user_avatar/blenderartists.org/leafar/48/661663_2

📋 Metadata

  • Author: roaoao
  • Date: 2016-05-14 06:37:43
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00161

🏷️ Tags

v1-19-x macro hotkeys intermediate solved

  • Macro Editor
  • Python Scripting
  • Hotkey Configuration

💬 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.


🔗 View on Blender Artists