I'd like to record my actions and create a macro. I've tried allready two things:
1) copying actions from Info panel and pasting them to text aditor. Then adding the lines:
import bpy
from mathutils import Vector, Matrix, Quaternion, Euler, Color
It works on the "Object" mode, but when I'm working on the "edit"mode, it does not record what vertice or face was selected. For example, if I'm creating box and then extruding the top face it looks like this:
bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False, location=(-4.74089, -5.86062, 3.95351), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.context.space_data.context = 'OBJECT'
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False}, TRANSFORM_OT_translate={"value":(0, 0, 0.788862), "constraint_axis":(False, False, True), "constraint_orientation":'NORMAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False})
bpy.ops.transform.translate(value=(0, 0, -0.434886), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True) # I've slected another face and moved it. No information here on which one.
so there is no information on what face or vertex was moved or extruded.
2) Macro Recorder found here just doesn't work. It creates the template but do not record enything. All it produces is this:
import bpy
from mathutils import Vector, Matrix, Quaternion, Euler, Color
class MacroOperator(bpy.types.Operator):
bl_idname = "macro.macro"
bl_label = "Macro"
def execute(self, context):
return {'FINISHED'}
def register():
bpy.utils.register_module(__name__)
def unregister():
bpy.utils.unregister_module(__name__)
if __name__ == "__main__":
register()
So, is there a way to record all actions, including face selection?