[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1449] trunk/py/scripts/addons/ render_povray/render.py: Add custom Anti-Aliasing pannel.

Constantin Rahn conz at vrchannel.de
Thu Jan 20 00:51:37 CET 2011


Revision: 1449
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1449
Author:   conz
Date:     2011-01-19 23:51:37 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
Add custom Anti-Aliasing pannel. Removed the default one.

Modified Paths:
--------------
    trunk/py/scripts/addons/render_povray/render.py

Modified: trunk/py/scripts/addons/render_povray/render.py
===================================================================
--- trunk/py/scripts/addons/render_povray/render.py	2011-01-19 22:13:56 UTC (rev 1448)
+++ trunk/py/scripts/addons/render_povray/render.py	2011-01-19 23:51:37 UTC (rev 1449)
@@ -1353,7 +1353,10 @@
         
     sel = scene.objects
     comments = scene.pov_comments_enable
-    if comments: file.write('//---------------------------------------------\n//--Exported with POV-Ray exporter for Blender--\n//---------------------------------------------\n')
+    if comments: file.write('//---------------------------------------------\n//--Exported with POV-Ray exporter for Blender--\n//---------------------------------------------\n\n')
+    
+    file.write('#version 3.7;\n')
+    
     if comments: file.write('\n//--Global settings and background--\n\n')
     
     exportGlobalSettings(scene)
@@ -1429,16 +1432,18 @@
     #file.write('Output_File_Type=T\n') # TGA, best progressive loading
     file.write('Output_Alpha=1\n')
 
-    if render.use_antialiasing:
-        aa_mapping = {'5': 2, '8': 3, '11': 4, '16': 5} # method 2 (recursive) with higher max subdiv forced because no mipmapping in POV-Ray needs higher sampling.
+    if scene.pov_antialias_enable:
+        # aa_mapping = {'5': 2, '8': 3, '11': 4, '16': 5} # method 2 (recursive) with higher max subdiv forced because no mipmapping in POV-Ray needs higher sampling.
+        method = {'0':1, '1':2}
         file.write('Antialias=on\n')
-        file.write('Sampling_Method=2\n')
-        file.write('Antialias_Depth=%d\n' % aa_mapping[render.antialiasing_samples])
-        file.write('Antialias_Threshold=0.1\n')#rather high settings but necessary.
+        print("Method: " + str(scene.pov_antialias_method))
+        file.write('Sampling_Method=%s\n' % method[scene.pov_antialias_method])
+        file.write('Antialias_Depth=%d\n' % scene.pov_antialias_depth)
+        file.write('Antialias_Threshold=%.3g\n' % scene.pov_antialias_threshold)
         file.write('Jitter=off\n')#prevent animation flicker
  
     else:
-        file.write('Antialias=0\n')
+        file.write('Antialias=off\n')
     file.write('Version=3.7')
     #print('ini file closed %s' % file.closed)
     file.close()



More information about the Bf-extensions-cvs mailing list