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 'io_import_images_as_planes.py')
-rw-r--r--io_import_images_as_planes.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 87f0c6c6..ea652842 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -250,9 +250,7 @@ def getTexture(path, img):
# ... otherwise create a new one and apply mapping.
if not tex:
name = path.rpartition('\\')[2].rpartition('.')[0]
- tex = bpy.data.textures.new(name=name)
- tex.type = 'IMAGE'
- tex = tex.recast_type()
+ tex = bpy.data.textures.new(name=name, type='IMAGE')
tex.image = img
return tex