[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1475] trunk/py/scripts/addons/ render_povray/render.py:
Maurice Raybaud
mauriceraybaud at hotmail.fr
Sat Jan 22 09:40:27 CET 2011
Revision: 1475
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1475
Author: mauriceraybaud
Date: 2011-01-22 08:40:26 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
Fixed Campbell's noticed strange code: a useless or statement
and made clearer clamping for Front and back diffuse.
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-01-22 06:09:36 UTC (rev 1474)
+++ trunk/py/scripts/addons/render_povray/render.py 2011-01-22 08:40:26 UTC (rev 1475)
@@ -359,9 +359,9 @@
elif frontDiffuse == backDiffuse:
frontDiffuse = backDiffuse = 0.5 # Try to respect the user's 'intention' by comparing the two values but bringing the total back to one
elif frontDiffuse > backDiffuse: # Let the highest value stay the highest value
- backDiffuse = 1 - (1 - frontDiffuse) # XXX FIXME!
+ backDiffuse = min(backDiffuse, (1.0 - frontDiffuse)) # clamps the sum below 1
else:
- frontDiffuse = 1 - (1 - backDiffuse) # XXX FIXME!
+ frontDiffuse = min(frontDiffuse, (1.0 - backDiffuse))
# map hardness between 0.0 and 1.0
roughness = ((1.0 - ((material.specular_hardness - 1.0) / 510.0)))
@@ -1256,7 +1256,7 @@
#For simple flat background:
if not world.use_sky_blend:
#Non fully transparent background could premultiply alpha and avoid anti-aliasing display issue:
- if render.alpha_mode == 'PREMUL' or render.alpha_mode == 'PREMUL': # XXX FIXME!
+ if render.alpha_mode == 'PREMUL':
tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0.75>}\n" % (world.horizon_color[:]))
#Currently using no alpha with Sky option:
elif render.alpha_mode == 'SKY':
More information about the Bf-extensions-cvs
mailing list