[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4792] trunk/py/scripts/addons/ render_povray/render.py: Added a patch by Markku Myllymaki, for animated textures using numbered images.

Maurice Raybaud mauriceraybaud at hotmail.fr
Thu Oct 10 18:52:46 CEST 2013


Revision: 4792
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4792
Author:   mauriceraybaud
Date:     2013-10-10 16:52:46 +0000 (Thu, 10 Oct 2013)
Log Message:
-----------
Added a patch by Markku Myllymaki, for animated textures using numbered images.

Modified Paths:
--------------
    trunk/py/scripts/addons/render_povray/render.py

Modified: trunk/py/scripts/addons/render_povray/render.py
===================================================================
--- trunk/py/scripts/addons/render_povray/render.py	2013-10-10 13:35:35 UTC (rev 4791)
+++ trunk/py/scripts/addons/render_povray/render.py	2013-10-10 16:52:46 UTC (rev 4792)
@@ -314,6 +314,7 @@
         comments = scene.pov.comments_enable
 
         if material:
+			# If saturation(.s) is not zero, then color is not grey, and has a tint
             colored_specular_found = (material.specular_color.s > 0.0)
 
         ##################
@@ -1211,6 +1212,14 @@
                                 for t in mater.texture_slots:
                                     if t and t.texture.type == 'IMAGE' and t.use and t.texture.image:
                                         image_filename = path_image(t.texture.image)
+                                        # IMAGE SEQUENCE BEGINS
+                                        if image_filename:
+                                            if bpy.data.images[t.texture.image.name].source == 'SEQUENCE':
+                                                korvaa = "." + str(bpy.data.textures[t.texture.name].image_user.frame_offset + 1).zfill(3) + "."
+                                                image_filename = image_filename.replace(".001.", korvaa)
+                                                print(" seq debug ")
+                                                print(image_filename)
+                                        # IMAGE SEQUENCE ENDS
                                         imgGamma = ""
                                         if image_filename:
                                             if t.use_map_color_diffuse:
@@ -1549,10 +1558,10 @@
                                 # Close first layer of POV "texture" (Blender material)
                                 tabWrite("}\n")
                                 
-                                if (mater.specular_color.r == mater.specular_color.g) and (mater.specular_color.r == mater.specular_color.b):
+                                if (mater.specular_color.s > 0.0):
+                                    colored_specular_found = True
+                                else:
                                     colored_specular_found = False
-                                else:
-                                    colored_specular_found = True
                                     
                                 # Write another layered texture using invisible diffuse and metallic trick 
                                 # to emulate colored specular highlights



More information about the Bf-extensions-cvs mailing list