diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2011-06-05 18:50:13 +0400 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2011-06-05 18:50:13 +0400 |
commit | c53c90b915926210306a1d2b7a841280cba08aef (patch) | |
tree | c4ad085f1ba1c655eb4622bf7cb767fa9cb16f26 /render_povray | |
parent | 486d37539516982aa9e54db914d054c194e8169f (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.py | 12 |
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" \ |