[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1915] trunk/py/scripts/addons/ render_povray: Added spacing_multiplier to object photons block so per object photon count tuning is now possible (see tooltip)
Maurice Raybaud
mauriceraybaud at hotmail.fr
Tue May 10 19:48:00 CEST 2011
Revision: 1915
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1915
Author: mauriceraybaud
Date: 2011-05-10 17:48:00 +0000 (Tue, 10 May 2011)
Log Message:
-----------
Added spacing_multiplier to object photons block so per object photon count tuning is now possible (see tooltip)
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-05-10 09:54:29 UTC (rev 1914)
+++ trunk/py/scripts/addons/render_povray/__init__.py 2011-05-10 17:48:00 UTC (rev 1915)
@@ -426,6 +426,14 @@
" that generate caustics often don't need to show any on themselves).",
default=True)
+ #Photons spacing_multiplier
+ spacing_multiplier = FloatProperty(
+ name="Photons Spacing Multiplier",
+ description="Multiplier value relative to global spacing of photons. " \
+ "Decrease by half to get 4x more photons at surface of " \
+ "this object (or 8x media photons than specified in the globals",
+ min=0.01, max=1.00, default=1.00)
+
##################################CustomPOV Code############################
#Only DUMMIES below for now:
replacement_text = StringProperty(
Modified: trunk/py/scripts/addons/render_povray/render.py
===================================================================
--- trunk/py/scripts/addons/render_povray/render.py 2011-05-10 09:54:29 UTC (rev 1914)
+++ trunk/py/scripts/addons/render_povray/render.py 2011-05-10 17:48:00 UTC (rev 1915)
@@ -333,9 +333,9 @@
if not ob.pov.collect_photons:
tabWrite("photons{collect off}\n")
- if pov_photons_refraction or pov_photons_reflection:
+ else:
tabWrite("photons{\n")
- tabWrite("target\n")
+ tabWrite("target %.3g\n" % ob.pov.spacing_multiplier)
if pov_photons_refraction:
tabWrite("refraction on\n")
if pov_photons_reflection:
Modified: trunk/py/scripts/addons/render_povray/ui.py
===================================================================
--- trunk/py/scripts/addons/render_povray/ui.py 2011-05-10 09:54:29 UTC (rev 1914)
+++ trunk/py/scripts/addons/render_povray/ui.py 2011-05-10 17:48:00 UTC (rev 1915)
@@ -560,13 +560,13 @@
obj = context.object
- layout.active = obj.pov.importance_value
-
col = layout.column()
col.label(text="Radiosity:")
col.prop(obj.pov, "importance_value", text="Importance")
col.label(text="Photons:")
col.prop(obj.pov, "collect_photons", text="Receive Photon Caustics")
+ if obj.pov.collect_photons:
+ col.prop(obj.pov, "spacing_multiplier", text="Photons Spacing Multiplier")
class OBJECT_PT_povray_replacement_text(ObjectButtonsPanel, bpy.types.Panel):
More information about the Bf-extensions-cvs
mailing list