Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-12 02:00:22 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-12 02:00:22 +0400
commit53d845ba69dee3b285e1584e987517f3e238078c (patch)
treeac15723377effdbf12c3156dd216ef20ec01b353 /intern/cycles/blender/addon/ui.py
parentc9dc80111b63fc1b28cae27d6f7ed02ee3bd53db (diff)
A big cleaning patch by Bastien Montagne (thanks a lot!)
* Split and moved Cycles’ render layers panels into the render_layer context as well (would be nice to hide this context when not needed, e.g. with the BGE, but this is not so easy to do nicely...). * Fixed some inconsistencies with trunk (probably due to svn merge glitches) using r52858 as reference. Also recovered the missing release/bin/blender-softwaregl file. * A bunch of style code fixes in Blender's own code (not Freestyle itself yet): line lengths, spaces around operators, block formatting, headers, etc. In rna_linestyle.c, color_blend_items was replaced by ramp_blend_items (exported from rna_material.c).
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r--intern/cycles/blender/addon/ui.py152
1 files changed, 91 insertions, 61 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index ba931469e8a..b7d58dca82a 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -221,10 +221,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
@@ -241,9 +300,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()
@@ -265,6 +339,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 = "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()
@@ -301,64 +389,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"