I'm trying to learn more about using the info window with Python. Turning it into an addon. I feel like I got pretty close, but it is giving me an error.
import bpy
class cubeMover():
bpy.ops.transform.translate(value=(0, 2.86946, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)
def register():
bpy.utils.register_class(cubeMover)
def unregister():
bpy.utils.unregister_class(cubeMover)
if __name__ == "__main__":
register()
When I run the code using just this it runs fine.
import bpy
bpy.ops.transform.translate(value=(0, 2.86946, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)
But when I try and change it into an addon it doesn't work.