diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-06 03:02:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-06 03:02:46 +0400 |
commit | 08fab40c57383b08241ad3e2489430dbd0461a1d (patch) | |
tree | aef50abcb6d9daa0098f71f251b23cd0f31d77a0 /io_scene_3ds | |
parent | 12ce4d0265ccbfb58334b782ef1f7f38eddf6b6c (diff) |
add back 3ds import image search option
Diffstat (limited to 'io_scene_3ds')
-rw-r--r-- | io_scene_3ds/import_3ds.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 73f18601..2947ec11 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -614,20 +614,16 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH): data = list(struct.unpack('<ffffffffffff', temp_data)) new_chunk.bytes_read += STRUCT_SIZE_4x3MAT - contextMatrix_rot = mathutils.Matrix((data[:3] + [0], \ - data[3:6] + [0], \ - data[6:9] + [0], \ - data[9:] + [1], \ + contextMatrix_rot = mathutils.Matrix((data[:3] + [0], + data[3:6] + [0], + data[6:9] + [0], + data[9:] + [1], )) elif (new_chunk.ID == MAT_MAP_FILEPATH): texture_name, read_str_len = read_string(file) - try: - TEXTURE_DICT[contextMaterial.name] - except: - #img = TEXTURE_DICT[contextMaterial.name]= BPyImage.comprehensiveImageLoad(texture_name, FILEPATH) - img = TEXTURE_DICT[contextMaterial.name] = load_image(texture_name, dirname) -# img = TEXTURE_DICT[contextMaterial.name]= BPyImage.comprehensiveImageLoad(texture_name, FILEPATH, PLACE_HOLDER=False, RECURSIVE=IMAGE_SEARCH) + if contextMaterial.name not in TEXTURE_DICT: + TEXTURE_DICT[contextMaterial.name] = load_image(texture_name, dirname, place_holder=False, recursive=IMAGE_SEARCH) new_chunk.bytes_read += read_str_len # plus one for the null character that gets removed elif new_chunk.ID == EDITKEYFRAME: |