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:
authorCampbell Barton <ideasman42@gmail.com>2006-03-14 23:28:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-03-14 23:28:02 +0300
commitafc8dec9218ad0f85dd5c32475d09dfde74723b5 (patch)
tree869405c98e621c9ddeafd6d4423d98274387edc0 /release/scripts/3ds_import.py
parentafeba9462e936cb9e7a89c3c1f4e5aec8fca5f84 (diff)
Small updates to import images in win32.
Diffstat (limited to 'release/scripts/3ds_import.py')
-rw-r--r--release/scripts/3ds_import.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/3ds_import.py b/release/scripts/3ds_import.py
index 371494f5cc2..2af387c7fe6 100644
--- a/release/scripts/3ds_import.py
+++ b/release/scripts/3ds_import.py
@@ -77,6 +77,7 @@ import Blender
from Blender import Mesh, Scene, Object, Material, Image, Texture, Lamp, Mathutils
from Blender.Mathutils import Vector
import BPyImage
+reload( BPyImage )
import struct
from struct import calcsize, unpack
@@ -271,7 +272,7 @@ def add_texture_to_material(image, texture, material, mapto):
if index>10:
print '/tError: Cannot add diffuse map. Too many textures'
-def process_next_chunk(file, filename, previous_chunk, scn):
+def process_next_chunk(file, previous_chunk, scn):
#print previous_chunk.bytes_read, 'BYTES READ'
contextObName= None
contextLamp= [None, None] # object, Data
@@ -393,7 +394,7 @@ def process_next_chunk(file, filename, previous_chunk, scn):
elif (new_chunk.ID==OBJECTINFO):
#print 'elif (new_chunk.ID==OBJECTINFO):'
# print 'found an OBJECTINFO chunk'
- process_next_chunk(file, filename, new_chunk, scn)
+ process_next_chunk(file, new_chunk, scn)
#keep track of how much we read in the main chunk
new_chunk.bytes_read+=temp_chunk.bytes_read
@@ -722,7 +723,7 @@ def process_next_chunk(file, filename, previous_chunk, scn):
putContextMesh(contextMesh, contextMeshMaterials)
def load_3ds(filename):
- print '\n\nImporting "%s"' % filename
+ print '\n\nImporting "%s" "%s"' % (filename, Blender.sys.expandpath(filename))
scn= Scene.GetCurrent()
for ob in scn.getChildren():
@@ -743,7 +744,7 @@ def load_3ds(filename):
file.close()
return
- process_next_chunk(file, filename, current_chunk, scn)
+ process_next_chunk(file, current_chunk, scn)
# Select all new objects.
print 'finished importing: "%s" in %.4f sec.' % (filename, (Blender.sys.time()-time1))