Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
51ee36db
Commit
51ee36db
authored
8 years ago
by
Bastien Montagne
Browse files
Options
Downloads
Patches
Plain Diff
Fix T51627: .mdd & .pc2 exporters never releasing temp mesh data.
Based on patch by Kai Kostack (@kaikostack), thanks!
parent
0ed2792d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
io_export_pc2.py
+5
-1
5 additions, 1 deletion
io_export_pc2.py
io_shape_mdd/__init__.py
+1
-0
1 addition, 0 deletions
io_shape_mdd/__init__.py
io_shape_mdd/export_mdd.py
+4
-0
4 additions, 0 deletions
io_shape_mdd/export_mdd.py
with
10 additions
and
1 deletion
io_export_pc2.py
+
5
−
1
View file @
51ee36db
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
io_shape_mdd/__init__.py
+
1
−
0
View file @
51ee36db
...
...
@@ -21,6 +21,7 @@
bl_info
=
{
"
name
"
:
"
NewTek MDD format
"
,
"
author
"
:
"
Bill L.Nieuwendorp
"
,
"
version
"
:
(
1
,
0
,
1
),
"
blender
"
:
(
2
,
57
,
0
),
"
location
"
:
"
File > Import-Export
"
,
"
description
"
:
"
Import-Export MDD as mesh shape keys
"
,
...
...
This diff is collapsed.
Click to expand it.
io_shape_mdd/export_mdd.py
+
4
−
0
View file @
51ee36db
...
...
@@ -98,6 +98,8 @@ 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
,
do_unlink
=
True
)
for
frame
in
range
(
frame_start
,
frame_end
+
1
):
# in order to start at desired frame
scene
.
frame_set
(
frame
)
me
=
obj
.
to_mesh
(
scene
,
True
,
'
PREVIEW
'
)
...
...
@@ -107,6 +109,8 @@ def save(context, filepath="", frame_start=1, frame_end=300, fps=25.0, use_rest_
# 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
,
do_unlink
=
True
)
f
.
close
()
print
(
'
MDD Exported: %r frames:%d
\n
'
%
(
filepath
,
numframes
-
1
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment