Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2006-05-19 21:28:17 +0400
committerChris Want <cwant@ualberta.ca>2006-05-19 21:28:17 +0400
commit62420c88fdf34fa6e433b51755f0f37f3dcb3584 (patch)
treed4ec22a8ab32bf5f319724dd38a1b58f09f8eb0d /release
parent4475c4211ae27c9a360091d39563f0d91940b457 (diff)
Hrmm, this is a bit nasty: I am now using a different call to get a mesh
for export depending on whether the object containing the data has modifiers or not. For an object without modifiers, things are nice since the mesh can be properly instanced and reused. For an object with modifiers there are problems, since a new Mesh has to be created, akin to doing an Alt-C on the mesh, and we end up using more memory after the use of the script than we used beforehand. (I wonder if I would be better off porting the thing to C.)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/vrml97_export.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py
index fca06b83016..7ede86f6686 100644
--- a/release/scripts/vrml97_export.py
+++ b/release/scripts/vrml97_export.py
@@ -473,7 +473,12 @@ class VRML2Export:
sided={} # 'one':cnt , 'two':cnt
vColors={} # 'multi':1
- me = ob.getData(mesh = 1)
+ if (len(ob.modifiers) > 0):
+ me = Mesh.New()
+ me.getFromObject(ob.name)
+ else:
+ me = ob.getData(mesh = 1)
+
self.classifyMesh(me, ob)
if (self.collnode):