[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14493] trunk/blender/release/scripts/ 3ds_import.py: Patch from Mario Lapin, fixes [#7394] 3ds File Import is broken
Campbell Barton
ideasman42 at gmail.com
Sun Apr 20 21:27:48 CEST 2008
Revision: 14493
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14493
Author: campbellbarton
Date: 2008-04-20 21:27:48 +0200 (Sun, 20 Apr 2008)
Log Message:
-----------
Patch from Mario Lapin, fixes [#7394] 3ds File Import is broken
Modified Paths:
--------------
trunk/blender/release/scripts/3ds_import.py
Modified: trunk/blender/release/scripts/3ds_import.py
===================================================================
--- trunk/blender/release/scripts/3ds_import.py 2008-04-20 19:25:23 UTC (rev 14492)
+++ trunk/blender/release/scripts/3ds_import.py 2008-04-20 19:27:48 UTC (rev 14493)
@@ -319,6 +319,7 @@
contextMesh_vertls= None
contextMesh_facels= None
contextMeshMaterials= {} # matname:[face_idxs]
+ contextMeshUV= None
TEXTURE_DICT={}
MATDICT={}
@@ -422,6 +423,9 @@
#a spare chunk
new_chunk= chunk()
temp_chunk= chunk()
+
+ ## @@ PATCH
+ shouldCreate = 0
#loop through all the data for this chunk (previous chunk) and see what it is
while (previous_chunk.bytes_read<previous_chunk.length):
@@ -454,6 +458,20 @@
#is it an object chunk?
elif (new_chunk.ID==OBJECT):
+ ## @@ PATCH
+ if shouldCreate:
+ putContextMesh(contextMesh_vertls, contextMesh_facels, contextMeshMaterials)
+ contextMesh_vertls= []; contextMesh_facels= []
+
+ ## preparando para receber o proximo objeto
+ contextMeshMaterials= {} # matname:[face_idxs]
+ contextMeshUV= None
+ #contextMesh.vertexUV= 1 # Make sticky coords.
+ # Reset matrix
+ contextMatrix_rot= None
+ #contextMatrix_tx= None
+
+ shouldCreate=1
tempName= read_string(file)
contextObName= tempName
new_chunk.bytes_read += len(tempName)+1
@@ -637,20 +655,9 @@
#contextMatrix_tx= None
#print contextLamp.name,
-
elif (new_chunk.ID==OBJECT_MESH):
- # print 'Found an OBJECT_MESH chunk'
- if contextMesh_facels != None: # Write context mesh if we have one.
- putContextMesh(contextMesh_vertls, contextMesh_facels, contextMeshMaterials)
-
- contextMesh_vertls= []; contextMesh_facels= []
-
- contextMeshMaterials= {} # matname:[face_idxs]
- contextMeshUV= None
- #contextMesh.vertexUV= 1 # Make sticky coords.
- # Reset matrix
- contextMatrix_rot= None
- #contextMatrix_tx= None
+ ## @@ PATCH
+ print 'Found an OBJECT_MESH chunk'
elif (new_chunk.ID==OBJECT_VERTICES):
'''
@@ -979,4 +986,4 @@
print 'TOTAL TIME: %.6f' % (Blender.sys.time() - TIME)
-'''
\ No newline at end of file
+'''
More information about the Bf-blender-cvs
mailing list