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:
authorDaniel Salazar <zanqdo@gmail.com>2010-12-10 19:06:35 +0300
committerDaniel Salazar <zanqdo@gmail.com>2010-12-10 19:06:35 +0300
commit170976b246b4e871f14a7840ffa068766d611a43 (patch)
tree95d23518283671d4fdb10eae7759209229fa43d8 /io_import_gimp_image_to_scene.py
parent77a9e1b8c78abc4f5abb8ced7fba68455b64cb4a (diff)
GIMP Image to Scene: Assigning the images to UV faces so they are shown out of GLSL too
Diffstat (limited to 'io_import_gimp_image_to_scene.py')
-rw-r--r--io_import_gimp_image_to_scene.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/io_import_gimp_image_to_scene.py b/io_import_gimp_image_to_scene.py
index ee6d779f..bdd4552e 100644
--- a/io_import_gimp_image_to_scene.py
+++ b/io_import_gimp_image_to_scene.py
@@ -343,6 +343,10 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\
if PremulAlpha: Img.use_premultiply = True
Img.filepath = '%s%s%s' % (PathSaveRaw, Name, ExtSave)
+ UVFace = Active.data.uv_textures[0].data[0]
+ UVFace.image = Img
+ UVFace.use_image = True
+
Tex.image = Img
Mat.texture_slots.add()
@@ -362,6 +366,10 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\
Img.source = 'FILE'
Img.filepath = '%s%s%s' % (PathSaveRaw, Name, ExtSave)
+ UVFace = Active.data.uv_textures[0].data[0]
+ UVFace.image = Img
+ UVFace.use_image = True
+
Tex.image = Img
Mat.texture_slots.add()