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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-11 15:09:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-11 15:09:15 +0300
commita2f135e7d725d3a9232dfef1ee19ecae2efb9e31 (patch)
tree9523e898ac2162a9a167740cec314cec8a1ab813 /io_scene_3ds
parent914ac4194f3070cc12338e533b6e29610faeb3aa (diff)
use mesh.validate() to ensure all meshes of imported data is ok and wont crash blender.
Diffstat (limited to 'io_scene_3ds')
-rw-r--r--io_scene_3ds/import_3ds.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index e53222bd..0a86cdc1 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -324,6 +324,9 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
uf.uv3 = contextMeshUV[v3 * 2:(v3 * 2) + 2]
# always a tri
+ bmesh.validate()
+ bmesh.update()
+
ob = bpy.data.objects.new(contextObName, bmesh)
object_dictionary[contextObName] = ob
SCN.objects.link(ob)
@@ -338,7 +341,6 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
object_matrix[ob] = contextMatrix_rot.copy()
importedObjects.append(ob)
- bmesh.update()
#a spare chunk
new_chunk = chunk()