[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1450] trunk/py/scripts/addons/ render_povray: AntiAlias Pannel UI und __init__

Constantin Rahn conz at vrchannel.de
Thu Jan 20 00:56:07 CET 2011


Revision: 1450
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1450
Author:   conz
Date:     2011-01-19 23:56:07 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
AntiAlias Pannel UI und __init__

Modified Paths:
--------------
    trunk/py/scripts/addons/render_povray/__init__.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-19 23:51:37 UTC (rev 1449)
+++ trunk/py/scripts/addons/render_povray/__init__.py	2011-01-19 23:56:07 UTC (rev 1450)
@@ -56,9 +56,9 @@
             description="Show advanced options",
             default=False)
     Scene.pov_media_enable = BoolProperty(
-        name="Enable Media",
-        description="Enable POV-Rays atmospheric media",
-        default=False)
+            name="Enable Media",
+            description="Enable POV-Rays atmospheric media",
+            default=False)
     Scene.pov_media_samples = IntProperty(
             name="Samples", description="Number of samples taken from camera to first object encountered along ray path for media calculation",
             min=1, max=100, default=35)
@@ -90,7 +90,26 @@
     Scene.pov_command_line_switches = StringProperty(name="Command Line Switches",
             description="Command line switches consist of a + (plus) or - (minus) sign, followed by one or more alphabetic characters and possibly a numeric value.",
             default="", maxlen=500)
+            
+    Scene.pov_antialias_enable = BoolProperty(
+            name="Anti-Alias", description="Enable Anti-Aliasing",
+            default=True)
+            
+    Scene.pov_antialias_method = EnumProperty(
+            name="Method",
+            description="AA-sampling method. Type 1 is an adaptive, non-recursive, super-sampling method. Type 2 is an adaptive and recursive super-sampling method.",
+            items=(("0", "non-recursive AA", "Type 1 Sampling in POV-Ray"),
+               ("1", "recursive AA", "Type 2 Sampling in POV-Ray")),
+            default="1")
+            
+    Scene.pov_antialias_depth = IntProperty(
+            name="Antialias Depth", description="Depth of pixel for sampling",
+            min=1, max=9, default=3)
     
+    Scene.pov_antialias_threshold = FloatProperty(
+            name="Antialias Threshold", description="Tolerance for sub-pixels",
+            min=0.0, max=1.0, soft_min=0.05, soft_max=0.5, default=0.1)
+    
     Scene.pov_max_trace_level = IntProperty(
             name="Max Trace Level", description="Number of reflections/refractions allowed on ray path",
             min=1, max=256, default=5)
@@ -277,10 +296,14 @@
     del Scene.pov_media_color # MR
     del Scene.pov_baking_enable # MR
     del Scene.pov_max_trace_level # MR
-    del Scene.pov_command_line_switches #CR
+    del Scene.pov_antialias_enable # CR
+    del Scene.pov_antialias_method # CR 
+    del Scene.pov_antialias_depth # CR
+    del Scene.pov_antialias_threshold # CR
+    del Scene.pov_command_line_switches # CR
     del Scene.pov_indentation_character # CR
-    del Scene.pov_indentation_spaces #CR
-    del Scene.pov_comments_enable #CR
+    del Scene.pov_indentation_spaces # CR
+    del Scene.pov_comments_enable # CR
     del Mat.pov_irid_enable # MR
     del Mat.pov_mirror_use_IOR # MR
     del Mat.pov_mirror_metallic # MR    

Modified: trunk/py/scripts/addons/render_povray/ui.py
===================================================================
--- trunk/py/scripts/addons/render_povray/ui.py	2011-01-19 23:51:37 UTC (rev 1449)
+++ trunk/py/scripts/addons/render_povray/ui.py	2011-01-19 23:56:07 UTC (rev 1450)
@@ -22,7 +22,7 @@
 import properties_render
 properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER')
 properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER')
+# properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER')
 properties_render.RENDER_PT_shading.COMPAT_ENGINES.add('POVRAY_RENDER')
 properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER')
 del properties_render
@@ -261,7 +261,7 @@
 ##            col.prop(mat, "pov_photons_reflection")
 ####TODO : MAKE THIS A real RADIO BUTTON (using EnumProperty?)
 ######################################EndMR#####################################
-class RENDER_PT_povray_max_trace_level(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_povray_global_settings(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Global Settings"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
 
@@ -277,8 +277,40 @@
         col = split.column()
         col.label(text="Command line switches:")
         col.prop(scene, "pov_command_line_switches", text="" )
+        split = layout.split()
+        col = split.column()
         col.prop(scene, "pov_max_trace_level", text="Ray Depth")
+        col = split.column()
 
+class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel):
+    bl_label = "Anti-Aliasing"
+    COMPAT_ENGINES = {'POVRAY_RENDER'}
+
+    def draw_header(self, context):
+        scene = context.scene
+
+        self.layout.prop(scene, "pov_antialias_enable", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        scene = context.scene
+        rd = scene.render
+
+        layout.active = scene.pov_antialias_enable
+
+        split = layout.split()
+        col = split.column()
+        col.prop(scene, "pov_antialias_method", text="")
+        col = split.column()
+       
+        split = layout.split()
+        col = split.column()
+        col.prop(scene, "pov_antialias_depth", text="Depth")
+        col = split.column()
+        col.prop(scene, "pov_antialias_threshold", text="Threshold")
+        
+        
 class RENDER_PT_povray_radiosity(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Radiosity"
     COMPAT_ENGINES = {'POVRAY_RENDER'}



More information about the Bf-extensions-cvs mailing list