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-12-06 03:02:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-06 03:02:46 +0400
commit08fab40c57383b08241ad3e2489430dbd0461a1d (patch)
treeaef50abcb6d9daa0098f71f251b23cd0f31d77a0
parent12ce4d0265ccbfb58334b782ef1f7f38eddf6b6c (diff)
add back 3ds import image search option
-rw-r--r--io_scene_3ds/import_3ds.py16
-rw-r--r--paint_palette.py1
2 files changed, 6 insertions, 11 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:
diff --git a/paint_palette.py b/paint_palette.py
index 19d576cd..95ebf228 100644
--- a/paint_palette.py
+++ b/paint_palette.py
@@ -57,7 +57,6 @@ def update_panels():
def sample():
pp = bpy.context.scene.palette_props
- context = bpy.context
current_color = pp.colors[pp.current_color_index]
brush = current_brush()
current_color.color = brush.color