[Bf-extensions-cvs] [ad393383] master: Pass 3 of 2.8 syntax update...
Maurice Raybaud
noreply at git.blender.org
Mon Apr 15 23:12:41 CEST 2019
Commit: ad393383b7a6e51048c1e05f6ff2e9886b34faf3
Author: Maurice Raybaud
Date: Mon Apr 15 23:12:29 2019 +0200
Branches: master
https://developer.blender.org/rBAad393383b7a6e51048c1e05f6ff2e9886b34faf3
Pass 3 of 2.8 syntax update...
===================================================================
M render_povray/render.py
M render_povray/ui.py
===================================================================
diff --git a/render_povray/render.py b/render_povray/render.py
index 90429bbf..7e605f19 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -3292,14 +3292,14 @@ def write_pov(filename, scene=None, info_callback=None):
# display issue:
if render.alpha_mode == 'TRANSPARENT':
tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0.75>}\n" % \
- (world.horizon_color[:]))
+ (world.color[:]))
#Currently using no alpha with Sky option:
elif render.alpha_mode == 'SKY':
- tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0>}\n" % (world.horizon_color[:]))
+ tabWrite("background {rgbt<%.3g, %.3g, %.3g, 0>}\n" % (world.color[:]))
#StraightAlpha:
# XXX Does not exists anymore
#else:
- #tabWrite("background {rgbt<%.3g, %.3g, %.3g, 1>}\n" % (world.horizon_color[:]))
+ #tabWrite("background {rgbt<%.3g, %.3g, %.3g, 1>}\n" % (world.color[:]))
worldTexCount = 0
#For Background image textures
@@ -3382,14 +3382,14 @@ def write_pov(filename, scene=None, info_callback=None):
tabWrite("color_map {\n")
# XXX Does not exists anymore
#if render.alpha_mode == 'STRAIGHT':
- #tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.horizon_color[:]))
+ #tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.color[:]))
#tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 1>]\n" % (world.zenith_color[:]))
if render.alpha_mode == 'TRANSPARENT':
- tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 0.99>]\n" % (world.horizon_color[:]))
+ tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 0.99>]\n" % (world.color[:]))
# aa premult not solved with transmit 1
tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 0.99>]\n" % (world.zenith_color[:]))
else:
- tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 0>]\n" % (world.horizon_color[:]))
+ tabWrite("[0.0 rgbt<%.3g, %.3g, %.3g, 0>]\n" % (world.color[:]))
tabWrite("[1.0 rgbt<%.3g, %.3g, %.3g, 0>]\n" % (world.zenith_color[:]))
tabWrite("}\n")
tabWrite("}\n")
@@ -3418,7 +3418,7 @@ def write_pov(filename, scene=None, info_callback=None):
elif mist.falloff=='INVERSE_QUADRATIC': # n**2 or squrt(n)?
tabWrite("distance %.6f\n" % ((mist.start+mist.depth)**2*0.368))
tabWrite("color rgbt<%.3g, %.3g, %.3g, %.3g>\n" % \
- (*world.horizon_color, 1.0 - mist.intensity))
+ (*world.color, 1.0 - mist.intensity))
#tabWrite("fog_offset %.6f\n" % mist.start) #create a pov property to prepend
#tabWrite("fog_alt %.6f\n" % mist.height) #XXX right?
#tabWrite("turbulence 0.2\n")
diff --git a/render_povray/ui.py b/render_povray/ui.py
index 949b9463..fa677524 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -1178,7 +1178,7 @@ class MATERIAL_PT_povray_active_node(MaterialButtonsPanel, bpy.types.Panel):
value_inputs = [socket for socket in node.inputs if socket.enabled and not socket.is_linked]
if value_inputs:
layout.separator()
- layout.label("Inputs:")
+ layout.label(text="Inputs:")
for socket in value_inputs:
row = layout.row()
socket.draw(context, row, node, socket.name)
@@ -1191,12 +1191,12 @@ class MATERIAL_PT_povray_active_node(MaterialButtonsPanel, bpy.types.Panel):
value_inputs = [socket for socket in node.inputs if socket.enabled and not socket.is_linked]
if value_inputs:
layout.separator()
- layout.label("Inputs:")
+ layout.label(text="Inputs:")
for socket in value_inputs:
row = layout.row()
socket.draw(context, row, node, socket.name)
else:
- layout.label("No active nodes!")
+ layout.label(text="No active nodes!")
class MATERIAL_PT_POV_mirror(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Mirror"
@@ -1242,7 +1242,7 @@ class MATERIAL_PT_POV_mirror(MaterialButtonsPanel, bpy.types.Panel):
col.prop(raym, "depth")
col.prop(raym, "distance", text="Max Dist")
col.separator()
- sub = col.split(percentage=0.4)
+ sub = col.split(factor=0.4)
sub.active = (raym.distance > 0.0)
sub.label(text="Fade To:")
sub.prop(raym, "fade_to", text="")
@@ -1389,7 +1389,7 @@ class TEXTURE_PT_povray_type(TextureButtonsPanel, bpy.types.Panel):
tex = context.texture
- split = layout.split(percentage=0.2)
+ split = layout.split(factor=0.2)
split.label(text="POV:")
split.prop(tex.pov, "tex_pattern_type", text="")
@@ -2045,7 +2045,7 @@ class BasicShapesMenu(bpy.types.Menu):
layout.separator()
layout.operator("pov.addblobsphere", text="Blob Sphere",icon = 'META_DATA')
layout.separator()
- layout.label("Isosurfaces")
+ layout.label(text="Isosurfaces")
layout.operator("pov.addisosurfacebox", text="Isosurface Box",icon="META_CUBE")
layout.operator("pov.addisosurfacesphere", text="Isosurface Sphere",icon="META_BALL")
layout.operator("pov.addsupertorus", text="Supertorus",icon="SURFACE_NTORUS")
More information about the Bf-extensions-cvs
mailing list