From 66aaf3780c6d4bc3174bc188f082c8223fa3ac6a Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Wed, 27 Oct 2010 21:57:41 +0000
Subject: [PATCH] dont change the path of the actual image texture

---
 render_povray/render.py | 44 ++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/render_povray/render.py b/render_povray/render.py
index 2ecd537d6..6e96380b7 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -859,28 +859,28 @@ def write_pov(filename, scene=None, info_callback=None):
                 texturesAlpha=''
                 for t in material.texture_slots:
                     if t and t.texture.type == 'IMAGE' and t.use and t.texture.image: 
-                        image_filename  = path_image(t.texture.image.filepath)
-                        if t.texture.image.filepath != image_filename: t.texture.image.filepath = image_filename
-                        if image_filename != '' and t.use_map_color_diffuse: 
-                            texturesDif = image_filename
-                            colvalue = t.default_value
-                            t_dif = t
-                        if image_filename != '' and (t.use_map_specular or t.use_map_raymir): 
-                            texturesSpec = image_filename
-                            colvalue = t.default_value
-                            t_spec = t
-                        if image_filename != '' and t.use_map_normal: 
-                            texturesNorm = image_filename
-                            colvalue = t.normal_factor * 10
-                            #textNormName=t.texture.image.name + '.normal'
-                            #was the above used? --MR
-                            t_nor = t
-                        if image_filename != '' and t.use_map_alpha: 
-                            texturesAlpha = image_filename
-                            colvalue = t.alpha_factor * 10
-                            #textDispName=t.texture.image.name + '.displ'
-                            #was the above used? --MR
-                            t_alpha = t
+                        image_filename = path_image(t.texture.image.filepath)
+                        if image_filename:
+                            if t.use_map_color_diffuse: 
+                                texturesDif = image_filename
+                                colvalue = t.default_value
+                                t_dif = t
+                            if t.use_map_specular or t.use_map_raymir: 
+                                texturesSpec = image_filename
+                                colvalue = t.default_value
+                                t_spec = t
+                            if t.use_map_normal: 
+                                texturesNorm = image_filename
+                                colvalue = t.normal_factor * 10.0
+                                #textNormName=t.texture.image.name + '.normal'
+                                #was the above used? --MR
+                                t_nor = t
+                            if t.use_map_alpha: 
+                                texturesAlpha = image_filename
+                                colvalue = t.alpha_factor * 10.0
+                                #textDispName=t.texture.image.name + '.displ'
+                                #was the above used? --MR
+                                t_alpha = t
 
 
 
-- 
GitLab