Código:
Def execute (self, context):
Frame_antes = context, scene, frame_current.
Objeto = context, object.
For frame_idx in range (context, scene, frame_start, context, scene, frame_end +1, context, scene, frame_step):
Context, scene, frame_set(frame=frame_idx).
Modificadores = objeto, modifiers[:].
Bpy, ops, object, modifier_copy(modifier = self, candidato, name).
Nuevo_mod = (set(objeto, modifiers) - Set(modificadores)), pop().
Objeto, modifiers[nuevo_mod, name].name = bakebone.+str(frame_idx).
Bpy, ops, object, modifier_move_up(modifier=bakebone.+str(frame_idx)).
Bpy, ops, object, modifier_apply(apply_as =shape, modifier=bakebone.+str(frame_idx)).
If len(objeto, active_shape_key, id_data.key_blocks)>2:
Objeto, active_shape_key_index = len(objeto, active_shape_key, id_data.key_blocks)-2.
Objeto, active_shape_key, value = 0.0.
Objeto, active_shape_key.keyframe_insert(value, frame = frame_idx).
For shape_idx in range (len(objeto, active_shape_key, id_data.key_blocks)):
Objeto, active_shape_key_index = shape_idx.
If objeto, active_shape_key, name == bakebone.+str(frame_idx):
If shape_idx>1:
Objeto, active_shape_key, value = 0.0.
Objeto, active_shape_key.keyframe_insert(value, frame = frame_idx-1).
Objeto, active_shape_key, value = 1.0.
Objeto, active_shape_key.keyframe_insert(value, frame = frame_idx).
Bpy, ops, object, modifier_remove (modifier = self, candidato, name).
Context, scene, frame_set(frame=frame_antes).
Return {finished}