[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1528] trunk/py/scripts/addons/ render_povray: Fixed rendering of animation.
Constantin Rahn
conz at vrchannel.de
Mon Jan 31 12:35:41 CET 2011
Revision: 1528
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1528
Author: conz
Date: 2011-01-31 11:35:40 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
Fixed rendering of animation. The scene updates before it's exporting.
Some minor pep8 fixes.
Modified Paths:
--------------
trunk/py/scripts/addons/render_povray/__init__.py
trunk/py/scripts/addons/render_povray/render.py
trunk/py/scripts/addons/render_povray/ui.py
Modified: trunk/py/scripts/addons/render_povray/__init__.py
===================================================================
--- trunk/py/scripts/addons/render_povray/__init__.py 2011-01-31 01:29:37 UTC (rev 1527)
+++ trunk/py/scripts/addons/render_povray/__init__.py 2011-01-31 11:35:40 UTC (rev 1528)
@@ -96,10 +96,10 @@
name="Media Color",
description="The atmospheric media color.",
subtype='COLOR',
- precision = 4,
- step = 0.01,
+ precision=4,
+ step=0.01,
min=0,
- soft_max = 1,
+ soft_max=1,
default=(0.001, 0.001, 0.001),
options={'ANIMATABLE'})
@@ -285,10 +285,10 @@
name="Fade Color",
description="Color of filtered attenuation for transparent materials",
subtype='COLOR',
- precision = 4,
- step = 0.01,
- min=0,
- soft_max = 1,
+ precision=4,
+ step=0.01,
+ min=0.0,
+ soft_max=1.0,
default=(0, 0, 0),
options={'ANIMATABLE'})
@@ -402,7 +402,6 @@
###########################################################################
-
def unregister():
import bpy
Scene = bpy.types.Scene
Modified: trunk/py/scripts/addons/render_povray/render.py
===================================================================
--- trunk/py/scripts/addons/render_povray/render.py 2011-01-31 01:29:37 UTC (rev 1527)
+++ trunk/py/scripts/addons/render_povray/render.py 2011-01-31 11:35:40 UTC (rev 1528)
@@ -536,10 +536,10 @@
tabWrite("rotate <%.6f, %.6f, %.6f>\n" % tuple([degrees(e) for e in matrix.rotation_part().to_euler()]))
tabWrite("translate <%.6f, %.6f, %.6f>\n" % (matrix[3][0], matrix[3][1], matrix[3][2]))
if camera.data.pov_dof_enable and focal_point != 0:
- tabWrite("aperture %.3g\n"% camera.data.pov_dof_aperture)
- tabWrite("blur_samples %d %d\n"% (camera.data.pov_dof_samples_min, camera.data.pov_dof_samples_max))
- tabWrite("variance 1/%d\n"% camera.data.pov_dof_variance)
- tabWrite("confidence %.3g\n"% camera.data.pov_dof_confidence)
+ tabWrite("aperture %.3g\n" % camera.data.pov_dof_aperture)
+ tabWrite("blur_samples %d %d\n" % (camera.data.pov_dof_samples_min, camera.data.pov_dof_samples_max))
+ tabWrite("variance 1/%d\n" % camera.data.pov_dof_variance)
+ tabWrite("confidence %.3g\n" % camera.data.pov_dof_confidence)
tabWrite("focal_point <0, 0, %f>\n" % focal_point)
tabWrite("}\n")
@@ -693,7 +693,7 @@
if material:
diffuse_color = material.diffuse_color
- trans= 1.0 - material.alpha
+ trans = 1.0 - material.alpha
if material.use_transparency and material.transparency_method == 'RAYTRACE':
povFilter = material.raytrace_transparency.filter * (1.0 - material.alpha)
trans = (1.0 - material.alpha) - povFilter
@@ -1707,6 +1707,8 @@
povPath = ""
renderImagePath = ""
+ scene.frame_set(scene.frame_current) # has to be called to update the frame on exporting animations
+
if not scene.pov_tempfiles_enable:
# check paths
Modified: trunk/py/scripts/addons/render_povray/ui.py
===================================================================
--- trunk/py/scripts/addons/render_povray/ui.py 2011-01-31 01:29:37 UTC (rev 1527)
+++ trunk/py/scripts/addons/render_povray/ui.py 2011-01-31 11:35:40 UTC (rev 1528)
@@ -134,6 +134,7 @@
rd = context.scene.render
return obj and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
+
class CameraDataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -147,7 +148,6 @@
return cam and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
-
class RENDER_PT_povray_export_settings(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Export Settings"
COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -405,6 +405,7 @@
mat = context.material
layout.active = mat.pov_mirror_metallic
+
class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Interior Fade Color"
COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -420,6 +421,7 @@
mat = context.material
layout.active = mat.pov_interior_fade_color
+
class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "conserve energy"
COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -488,7 +490,7 @@
col.prop(mat, "pov_photons_dispersion", slider=True)
col.prop(mat, "pov_photons_reflection")
- if mat.pov_refraction_type=="0" and not mat.pov_photons_reflection:
+ if mat.pov_refraction_type == "0" and not mat.pov_photons_reflection:
split = layout.split()
col = split.column()
row = col.row()
@@ -499,7 +501,6 @@
row.label(text="but you didn't chose any !")
-
class TEXTURE_PT_povray_tex_gamma(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Image Gamma"
COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -540,6 +541,7 @@
col.label(text="Photons")
col.prop(obj, "pov_collect_photons", text="Receive Photon Caustics")
+
class Camera_PT_povray_cam_dof(CameraDataButtonsPanel, bpy.types.Panel):
bl_label = "POV-Ray Depth Of Field"
COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -570,5 +572,3 @@
col.prop(cam, "pov_dof_samples_max")
col.prop(cam, "pov_dof_confidence")
-
-
More information about the Bf-extensions-cvs
mailing list