diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 154 |
1 files changed, 92 insertions, 62 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 0debb549b30..b9fbb85581e 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -233,10 +233,69 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): sub.prop(rd, "use_persistent_data", text="Persistent Images") +class Cycles_PT_post_processing(CyclesButtonsPanel, Panel): + bl_label = "Post Processing" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + + split = layout.split() + + col = split.column() + col.prop(rd, "use_compositing") + col.prop(rd, "use_sequencer") + + col = split.column() + col.prop(rd, "dither_intensity", text="Dither", slider=True) + + +class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel): + bl_label = "Depth of Field" + bl_context = "data" + + @classmethod + def poll(cls, context): + return context.camera and CyclesButtonsPanel.poll(context) + + def draw(self, context): + layout = self.layout + + cam = context.camera + ccam = cam.cycles + + split = layout.split() + + col = split.column() + col.label("Focus:") + col.prop(cam, "dof_object", text="") + + sub = col.row() + sub.active = cam.dof_object is None + sub.prop(cam, "dof_distance", text="Distance") + + col = split.column() + + col.label("Aperture:") + sub = col.column(align=True) + sub.prop(ccam, "aperture_type", text="") + if ccam.aperture_type == 'RADIUS': + sub.prop(ccam, "aperture_size", text="Size") + elif ccam.aperture_type == 'FSTOP': + sub.prop(ccam, "aperture_fstop", text="Number") + + sub = col.column(align=True) + sub.prop(ccam, "aperture_blades", text="Blades") + sub.prop(ccam, "aperture_rotation", text="Rotation") + + class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): bl_label = "Layers" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER'} + bl_options = {'HIDE_HEADER'} + bl_context = "render_layer" + COMPAT_ENGINES = {'CYCLES'} def draw(self, context): layout = self.layout @@ -245,7 +304,7 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): rd = scene.render row = layout.row() - row.template_list("RENDER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=2) + row.template_list("RENDERLAYER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=2) col = row.column(align=True) col.operator("scene.render_layer_add", icon='ZOOMIN', text="") @@ -253,9 +312,24 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): row = layout.row() rl = rd.layers.active - row.prop(rl, "name") + if rl: + row.prop(rl, "name") row.prop(rd, "use_single_layer", text="", icon_only=True) + +class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel): + bl_label = "Layer" + bl_options = {'DEFAULT_CLOSED'} + bl_context = "render_layer" + COMPAT_ENGINES = {'CYCLES'} + + def draw(self, context): + layout = self.layout + + scene = context.scene + rd = scene.render + rl = rd.layers.active + split = layout.split() col = split.column() @@ -277,6 +351,20 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): col.prop(rl, "samples") col.prop(rl, "use_sky", "Use Environment") + +class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel): + bl_label = "Render Passes" + bl_options = {'DEFAULT_CLOSED'} + bl_context = "render_layer" + COMPAT_ENGINES = {'CYCLES'} + + def draw(self, context): + layout = self.layout + + scene = context.scene + rd = scene.render + rl = rd.layers.active + split = layout.split() col = split.column() @@ -313,64 +401,6 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): col.prop(rl, "use_pass_environment") -class Cycles_PT_post_processing(CyclesButtonsPanel, Panel): - bl_label = "Post Processing" - bl_options = {'DEFAULT_CLOSED'} - - def draw(self, context): - layout = self.layout - - rd = context.scene.render - - split = layout.split() - - col = split.column() - col.prop(rd, "use_compositing") - col.prop(rd, "use_sequencer") - - col = split.column() - col.prop(rd, "dither_intensity", text="Dither", slider=True) - - -class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel): - bl_label = "Depth of Field" - bl_context = "data" - - @classmethod - def poll(cls, context): - return context.camera and CyclesButtonsPanel.poll(context) - - def draw(self, context): - layout = self.layout - - cam = context.camera - ccam = cam.cycles - - split = layout.split() - - col = split.column() - col.label("Focus:") - col.prop(cam, "dof_object", text="") - - sub = col.row() - sub.active = cam.dof_object is None - sub.prop(cam, "dof_distance", text="Distance") - - col = split.column() - - col.label("Aperture:") - sub = col.column(align=True) - sub.prop(ccam, "aperture_type", text="") - if ccam.aperture_type == 'RADIUS': - sub.prop(ccam, "aperture_size", text="Size") - elif ccam.aperture_type == 'FSTOP': - sub.prop(ccam, "aperture_fstop", text="Number") - - sub = col.column(align=True) - sub.prop(ccam, "aperture_blades", text="Blades") - sub.prop(ccam, "aperture_rotation", text="Rotation") - - class Cycles_PT_context_material(CyclesButtonsPanel, Panel): bl_label = "" bl_context = "material" |