Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Rahn <conz@vrchannel.de>2011-01-31 14:35:40 +0300
committerConstantin Rahn <conz@vrchannel.de>2011-01-31 14:35:40 +0300
commit338ac1e5b5934d69bcb5ff871145c74ee3cf0a00 (patch)
tree85b12ecfb667552046d3287d1e7ae560a8a71dcb /render_povray
parent14a62bc7038f62ac73e7f45eed7c655e20e5daa2 (diff)
Fixed rendering of animation. The scene updates before it's exporting.
Some minor pep8 fixes.
Diffstat (limited to 'render_povray')
-rw-r--r--render_povray/__init__.py15
-rw-r--r--render_povray/render.py12
-rw-r--r--render_povray/ui.py10
3 files changed, 19 insertions, 18 deletions
diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index cfb72632..6d7fb77d 100644
--- a/render_povray/__init__.py
+++ b/render_povray/__init__.py
@@ -96,10 +96,10 @@ def register():
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 @@ def register():
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 register():
###########################################################################
-
def unregister():
import bpy
Scene = bpy.types.Scene
diff --git a/render_povray/render.py b/render_povray/render.py
index 5844a0ee..6ecae2bd 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -536,10 +536,10 @@ def write_pov(filename, scene=None, info_callback=None):
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 @@ def write_pov(filename, scene=None, info_callback=None):
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 @@ class PovrayRender(bpy.types.RenderEngine):
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
diff --git a/render_povray/ui.py b/render_povray/ui.py
index ba2e2411..0f6af27f 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -134,6 +134,7 @@ class ObjectButtonsPanel():
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 @@ class CameraDataButtonsPanel():
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 @@ class MATERIAL_PT_povray_metallic(MaterialButtonsPanel, bpy.types.Panel):
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 @@ class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel):
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 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
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 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
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 @@ class OBJECT_PT_povray_obj_importance(ObjectButtonsPanel, bpy.types.Panel):
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 @@ class Camera_PT_povray_cam_dof(CameraDataButtonsPanel, bpy.types.Panel):
col.prop(cam, "pov_dof_samples_max")
col.prop(cam, "pov_dof_confidence")
-
-