Fix [#33759] Can't use UV image export UV_layout error

Another glitch from recent alpha work. Also modified povray's code. As usual, maintainders of these scripts, please double check changes are ok! :)
This commit is contained in:
Bastien Montagne
2013-01-04 16:37:47 +00:00
parent ce5fb029ba
commit 43b6396c1c
2 changed files with 10 additions and 8 deletions

View File

@ -1697,15 +1697,16 @@ def write_pov(filename, scene=None, info_callback=None):
if not world.use_sky_blend:
# Non fully transparent background could premultiply alpha and avoid anti-aliasing
# display issue:
if render.alpha_mode == 'PREMUL':
if render.alpha_mode == 'TRANSPARENT':
tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0.75>}\n" % \
(world.horizon_color[:]))
#Currently using no alpha with Sky option:
elif render.alpha_mode == 'SKY':
tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0>}\n" % (world.horizon_color[:]))
#StraightAlpha:
else:
tabWrite("background {rgbt<%.3g, %.3g, %.3g, 1>}\n" % (world.horizon_color[:]))
# XXX Does not exists anymore
#else:
#tabWrite("background {rgbt<%.3g, %.3g, %.3g, 1>}\n" % (world.horizon_color[:]))
worldTexCount = 0
#For Background image textures
@ -1776,10 +1777,11 @@ def write_pov(filename, scene=None, info_callback=None):
# for skysphere..5.5
tabWrite("gradient y\n")
tabWrite("color_map {\n")
if render.alpha_mode == 'STRAIGHT':
tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.horizon_color[:]))
tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.zenith_color[:]))
elif render.alpha_mode == 'PREMUL':
# XXX Does not exists anymore
#if render.alpha_mode == 'STRAIGHT':
#tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.horizon_color[:]))
#tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.zenith_color[:]))
elif render.alpha_mode == 'TRANSPARENT':
tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 0.99>]\n" % (world.horizon_color[:]))
# aa premult not solved with transmit 1
tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 0.99>]\n" % (world.zenith_color[:]))