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:
Diffstat (limited to 'space_view3d_materials_utils.py')
-rw-r--r--space_view3d_materials_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index c013e4c6..8417c4c5 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -416,7 +416,10 @@ def check_texture(img,mat):
found = True
break
if not found and mat:
- mat.add_texture(tex, texture_coordinates='UV', map_to='COLOR')
+ mtex = mat.texture_slots.add()
+ mtex.texture = tex
+ mtex.texture_coords = 'UV'
+ mtex.use_map_color_diffuse = True
def texface_to_mat():
# editmode check here!