[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2003] trunk/py/scripts/addons/ render_povray/render.py: Fixed a minor bug with SSS property

Maurice Raybaud mauriceraybaud at hotmail.fr
Sun Jun 5 16:50:13 CEST 2011


Revision: 2003
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2003
Author:   mauriceraybaud
Date:     2011-06-05 14:50:13 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Fixed a minor bug with SSS property
Added export of only renderable objects via outliner hide_render property and active layers. Also thanks to all those who helped bringing instances through their designs or advice: Conz, mont29, Campbell.

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	2011-06-05 07:56:28 UTC (rev 2002)
+++ trunk/py/scripts/addons/render_povray/render.py	2011-06-05 14:50:13 UTC (rev 2003)
@@ -1,4 +1,4 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
+# ##### BEGIN GPL LICENSE BLOCK #####
 #
 #  This program is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU General Public License
@@ -166,7 +166,13 @@
 ##############end safety string name material
 ##############################EndSF###########################
 
+def is_renderable(scene, ob):
+    return (ob.is_visible(scene) and not ob.hide_render)
 
+def renderable_objects(scene):
+    return [ob for ob in scene.objects if is_renderable(scene, ob)]
+
+
 tabLevel = 0
 
 
@@ -1709,7 +1715,7 @@
         onceAmbient = 1
         oncePhotons = 1
         for material in bpy.data.materials:
-            if material.subsurface_scattering.use and once:
+            if material.subsurface_scattering.use and onceSss:
                 # In pov, the scale has reversed influence compared to blender. these number
                 # should correct that
                 tabWrite("mm_per_unit %.6f\n" % \
@@ -1741,7 +1747,7 @@
                 file.write(txt.as_string())
                 file.write("\n")
 
-    sel = scene.objects
+    sel = renderable_objects(scene)
     comments = scene.pov.comments_enable
     if not scene.pov.tempfiles_enable and comments:
         file.write("//----------------------------------------------\n" \



More information about the Bf-extensions-cvs mailing list