diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2011-01-31 04:29:37 +0300 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2011-01-31 04:29:37 +0300 |
commit | 14a62bc7038f62ac73e7f45eed7c655e20e5daa2 (patch) | |
tree | 79272af7a3ccd1dee1f4ef32e718b5b369fa2771 /render_povray/ui.py | |
parent | 4b94ad37333f868e1d3f29d6505a29f569b6c5dc (diff) |
Added more UI controls for Depth of Field
Cleaned up Media and photons UI layouts
Diffstat (limited to 'render_povray/ui.py')
-rw-r--r-- | render_povray/ui.py | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/render_povray/ui.py b/render_povray/ui.py index b302f5b5..ba2e2411 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -134,6 +134,19 @@ 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' + bl_context = "data" + # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here + + @classmethod + def poll(cls, context): + cam = context.camera + rd = context.scene.render + 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" @@ -196,19 +209,25 @@ class RENDER_PT_povray_render_settings(RenderButtonsPanel, bpy.types.Panel): rd = scene.render layout.active = scene.pov_max_trace_level + split = layout.split() - col = split.column() + col.label(text="Global Settings") col.prop(scene, "pov_max_trace_level", text="Ray Depth") - row = col.row() + col.label(text="Global Photons") col.prop(scene, "pov_photon_max_trace_level", text="Photon Depth") - row = col.row() + + split = layout.split() + col = split.column() col.prop(scene, "pov_photon_spacing", text="Spacing") + col.prop(scene, "pov_photon_gather_min") + + col = split.column() + col.prop(scene, "pov_photon_adc_bailout", text="Photon ADC") - col.prop(scene, "pov_photon_gather_min", text="Photons gathered min") - col.prop(scene, "pov_photon_gather_max", text="Photons gathered max") + col.prop(scene, "pov_photon_gather_max") class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel): @@ -324,7 +343,8 @@ class RENDER_PT_povray_media(RenderButtonsPanel, bpy.types.Panel): col = split.column() col.prop(scene, "pov_media_samples", text="Samples") - col.prop(scene, "pov_media_color", text="Color") + col = split.column() + col.prop(scene, "pov_media_color", text="") ##class RENDER_PT_povray_baking(RenderButtonsPanel, bpy.types.Panel): ## bl_label = "Baking" @@ -519,3 +539,36 @@ class OBJECT_PT_povray_obj_importance(ObjectButtonsPanel, bpy.types.Panel): row = col.row() 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'} + + def draw_header(self, context): + cam = context.camera + + self.layout.prop(cam, "pov_dof_enable", text="") + + def draw(self, context): + layout = self.layout + + cam = context.camera + + layout.active = cam.pov_dof_enable + + split = layout.split() + row = split.row() + row.prop(cam, "pov_dof_aperture") + + split = layout.split() + col = split.column() + + col.prop(cam, "pov_dof_samples_min") + col.prop(cam, "pov_dof_variance") + + col = split.column() + + col.prop(cam, "pov_dof_samples_max") + col.prop(cam, "pov_dof_confidence") + + |