From 51ee36db621093d010393c256e1ebf9aed47637d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 27 May 2017 14:56:57 +0200 Subject: Fix T51627: .mdd & .pc2 exporters never releasing temp mesh data. Based on patch by Kai Kostack (@kaikostack), thanks! --- io_export_pc2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'io_export_pc2.py') diff --git a/io_export_pc2.py b/io_export_pc2.py index fdc72324..752df5c4 100644 --- a/io_export_pc2.py +++ b/io_export_pc2.py @@ -19,7 +19,7 @@ bl_info = { "name": "Export Pointcache Format(.pc2)", "author": "Florian Meyer (tstscr)", - "version": (1, 1), + "version": (1, 1, 1), "blender": (2, 71, 0), "location": "File > Export > Pointcache (.pc2)", "description": "Export mesh Pointcache data (.pc2)", @@ -79,6 +79,7 @@ def do_export(context, props, filepath): me = ob.to_mesh(sc, apply_modifiers, 'PREVIEW') if len(me.vertices) != vertCount: + bpy.data.meshes.remove(me, do_unlink=True) file.close() try: remove(filepath) @@ -100,6 +101,9 @@ def do_export(context, props, filepath): float(v.co[2])) file.write(thisVertex) + bpy.data.meshes.remove(me, do_unlink=True) + + file.flush() file.close() return True -- cgit v1.2.3