.mdd & .pc2 export leave unfreed mesh data in memory killing Blender on larger animations #51627

Closed
opened 2017-05-25 19:38:44 +02:00 by Kai Kostack · 4 comments

For a project I needed to export a larger mesh animation either as .mdd or .pc2 file. I was unable to do so because the exporters ran out of memory. The reason is that they are creating a new mesh data block per each frame but not deleting them after the data has been written to file which leads to a steadily increasing memory consumption the longer the animation sequence gets.

Here is one example, try to export it in either format and monitor memory usage:
1_export.blend

The solution is a one-liner deleting the data block afterwards by bpy.data.meshes.remove().

Try above test again with this patch and note the difference: patch.diff

System: Windows 7 x64

For a project I needed to export a larger mesh animation either as .mdd or .pc2 file. I was unable to do so because the exporters ran out of memory. The reason is that they are creating a new mesh data block per each frame but not deleting them after the data has been written to file which leads to a steadily increasing memory consumption the longer the animation sequence gets. Here is one example, try to export it in either format and monitor memory usage: [1_export.blend](https://archive.blender.org/developer/F609166/1_export.blend) The solution is a one-liner deleting the data block afterwards by bpy.data.meshes.remove(). Try above test again with this patch and note the difference: [patch.diff](https://archive.blender.org/developer/F609167/patch.diff) System: Windows 7 x64
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @KaiKostack-3

Added subscriber: @KaiKostack-3

This issue was referenced by 51ee36db62

This issue was referenced by 51ee36db621093d010393c256e1ebf9aed47637d

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Bastien Montagne self-assigned this 2017-05-27 14:59:21 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#51627
No description provided.