From 8a0e2f9d94f8a173f23867dbaf33f04da52f0fbb Mon Sep 17 00:00:00 2001
From: Maurice Raybaud <mauriceraybaud@hotmail.fr>
Date: Tue, 4 Jun 2013 11:55:10 +0000
Subject: [PATCH] *Fixed a bug with POV replacement code introduced with latest
 addition of colored spec.

*changed default values for the folowing properties to be more useful in most scenes:
- radio_low_error_factor
- fake_caustics_power
- importance_value
---
 render_povray/__init__.py | 6 +++---
 render_povray/render.py   | 8 +++-----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index e5e456007..140e89695 100644
--- a/render_povray/__init__.py
+++ b/render_povray/__init__.py
@@ -248,7 +248,7 @@ class RenderPovSettingsScene(PropertyGroup):
             name="Low Error Factor",
             description="Just enough samples is slightly blotchy. Low error changes error "
                         "tolerance for less critical last refining pass",
-            min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default=0.5)
+            min=0.000001, max=1.0, soft_min=0.000001, soft_max=1.0, default=0.5)
 
     # max_sample - not available yet
     radio_media = BoolProperty(
@@ -355,7 +355,7 @@ class RenderPovSettingsMaterial(PropertyGroup):
             description="Values typically range from 0.0 to 1.0 or higher. Zero is no caustics. "
                         "Low, non-zero values give broad hot-spots while higher values give "
                         "tighter, smaller simulated focal points",
-            min=0.00, max=10.0, soft_min=0.00, soft_max=1.10, default=0.1)
+            min=0.00, max=10.0, soft_min=0.00, soft_max=1.10, default=0.5)
 
     photons_refraction = BoolProperty(
             name="Refractive Photon Caustics", description="more physically correct",
@@ -429,7 +429,7 @@ class RenderPovSettingsObject(PropertyGroup):
             description="Priority value relative to other objects for sampling radiosity rays. "
                         "Increase to get more radiosity rays at comparatively small yet "
                         "bright objects",
-            min=0.01, max=1.00, default=1.00)
+            min=0.01, max=1.00, default=0.50)
 
     # Collect photons
     collect_photons = BoolProperty(
diff --git a/render_povray/render.py b/render_povray/render.py
index 50cece644..86ecf77af 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -1544,12 +1544,10 @@ def write_pov(filename, scene=None, info_callback=None):
                                         tabWrite("}\n")
                                         c += 1
 
-                                if material.pov.replacement_text == "":
-
-                                    
+                                  
                                         
-                                    # Close first layer of POV "texture" (Blender material)
-                                    tabWrite("}\n")
+                                # Close first layer of POV "texture" (Blender material)
+                                tabWrite("}\n")
                                 
                                 if (material.specular_color.r == material.specular_color.g) and (material.specular_color.r == material.specular_color.b):
                                     colored_specular_found = False
-- 
GitLab