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:
authorMaurice Raybaud <mauriceraybaud@hotmail.fr>2011-06-05 18:50:13 +0400
committerMaurice Raybaud <mauriceraybaud@hotmail.fr>2011-06-05 18:50:13 +0400
commitc53c90b915926210306a1d2b7a841280cba08aef (patch)
treec4ad085f1ba1c655eb4622bf7cb767fa9cb16f26 /render_povray
parent486d37539516982aa9e54db914d054c194e8169f (diff)
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.
Diffstat (limited to 'render_povray')
-rw-r--r--render_povray/render.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/render_povray/render.py b/render_povray/render.py
index 92b97518..f1d81f06 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -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,6 +166,12 @@ def safety(name, Level):
##############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 @@ def write_pov(filename, scene=None, info_callback=None):
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 @@ def write_pov(filename, scene=None, info_callback=None):
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" \