Operating system: Windows 10 Home
Graphics card: GTX 1070 8GB
Broken: 2.80, 8ac0fef4dfd1, 2019-06-14
Worked: 2.79, 5bd8ac9, 2017-09-11
Short description of error
I have created a small script that updates an object mesh geometry within a frame_change_pre handler. Now I want to export the animation using the Alembic exporter. I have added a modifier to the object so that it is recognized as an animated mesh during Alembic export (according to this comment).
In Blender 2.79, the exported mesh is animated, but in Blender 2.80 the exported mesh is static.
import bpy def frame_change_pre(scene): # A triangle that shifts in the z direction zshift = scene.frame_current * 0.1 vertices = [(-1, -1, zshift), (1, -1, zshift), (0, 1, zshift)] triangles = [(0, 1, 2)] new_mesh_data = bpy.data.meshes.new("mesh_data" + str(scene.frame_current)) new_mesh_data.from_pydata(vertices, , triangles) mesh_cache = bpy.data.objects.get("mesh_cache") old_mesh_data = mesh_cache.data mesh_cache.data = new_mesh_data bpy.data.meshes.remove(old_mesh_data) bpy.app.handlers.frame_change_pre.append(frame_change_pre)
Exact steps for others to reproduce the error
I have attached a .blend file that will reproduce the issue and that will run in both 2.79 and 2.80.
- Open .blend file in Blender 2.80
- Run the script
- File > Export > Alembic
- Import the Alembic cache into the scene
Result: the Alembic cache is not animated