diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-06-21 12:53:52 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-06-21 12:55:34 +0300 |
commit | 55f919089577119afa2623526ba285c4e620fc6e (patch) | |
tree | 2979fdcac67ee7acb78658023da1d366889c22fd | |
parent | 532fee9ca518e71d3e385805881875117ba92e63 (diff) |
Fix T65973: mdd export fails after recent depsgraph API changes
fix for fix (oversight in rBA901868a4b)
-rw-r--r-- | io_shape_mdd/export_mdd.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/io_shape_mdd/export_mdd.py b/io_shape_mdd/export_mdd.py index 4ca22e91..d5e88d51 100644 --- a/io_shape_mdd/export_mdd.py +++ b/io_shape_mdd/export_mdd.py @@ -68,7 +68,7 @@ def save(context, filepath="", frame_start=1, frame_end=300, fps=25.0, use_rest_ orig_frame = scene.frame_current scene.frame_set(frame_start) depsgraph = context.evaluated_depsgraph_get() - obj_eval = obj.evaluated_get + obj_eval = obj.evaluated_get(depsgraph) me = obj_eval.to_mesh() #Flip y and z @@ -100,25 +100,24 @@ def save(context, filepath="", frame_start=1, frame_end=300, fps=25.0, use_rest_ me.transform(mat_flip @ obj.matrix_world) f.write(pack(">%df" % (numverts * 3), *[axis for v in me.vertices for axis in v.co])) - bpy.data.meshes.remove(me) + obj_eval.to_mesh_clear() for frame in range(frame_start, frame_end + 1): # in order to start at desired frame scene.frame_set(frame) depsgraph = context.evaluated_depsgraph_get() - me = obj.evaluated_get(depsgraph).to_mesh() + obj_eval = obj.evaluated_get(depsgraph) + me = obj_eval.to_mesh() check_vertcount(me, numverts) me.transform(mat_flip @ obj.matrix_world) # Write the vertex data f.write(pack(">%df" % (numverts * 3), *[axis for v in me.vertices for axis in v.co])) - bpy.data.meshes.remove(me) + obj_eval.to_mesh_clear() f.close() print('MDD Exported: %r frames:%d\n' % (filepath, numframes - 1)) scene.frame_set(orig_frame) - obj_eval.to_mesh_clear() - return {'FINISHED'} |