Merged changes in the trunk up to revision 29409.
[blender.git] / release / scripts / ui / properties_render.py
index 8bbe11a5f9094867091682734bbe4b2b08dde431..f18a93aee2c336f1203a7d6d63d58500e9be2868 100644 (file)
@@ -123,11 +123,12 @@ class RENDER_PT_layers(RenderButtonsPanel):
         col.prop(rl, "solid")
         col.prop(rl, "halo")
         col.prop(rl, "ztransp")
-
-        col = split.column()
         col.prop(rl, "sky")
+               
+        col = split.column()
         col.prop(rl, "edge")
         col.prop(rl, "strand")
+        col.prop(rl, "freestyle")
 
         layout.separator()
 
@@ -173,6 +174,35 @@ class RENDER_PT_layers(RenderButtonsPanel):
         row.prop(rl, "pass_refraction")
         row.prop(rl, "pass_refraction_exclude", text="")
 
+        if rl.freestyle:
+            layout.separator()
+
+            split = layout.split()
+
+            col = split.column()
+            col.label(text="Freestyle:")
+            freestyle = rl.freestyle_settings
+            col.prop(freestyle, "crease_angle", text="Crease Angle")
+            col.prop(freestyle, "sphere_radius", text="Sphere Radius")
+            col.prop(freestyle, "ridges_and_valleys", text="Ridges and Valleys")
+            col.prop(freestyle, "suggestive_contours", text="Suggestive Contours")
+            col.prop(freestyle, "material_boundaries", text="Material Boundaries")
+            col.prop(freestyle, "dkr_epsilon", text="Dkr Epsilon")
+
+            col.operator("scene.freestyle_module_add", text="Add Style Module")
+
+            for i, module in enumerate(freestyle.modules):
+                    box = layout.box()
+                    box.set_context_pointer("freestyle_module", module)
+                    row = box.row(align=True)
+                    row.prop(module, "is_displayed", text="")
+                    row.prop(module, "module_path", text="")
+                    row.operator("scene.freestyle_module_remove", icon='X', text="")
+                    props = row.operator("scene.freestyle_module_move_up", icon='MOVE_UP_VEC', text="")
+                    props.active = (i > 0)
+                    props = row.operator("scene.freestyle_module_move_down", icon='MOVE_DOWN_VEC', text="")
+                    props.active = (i < len(freestyle.modules) - 1)
+
 
 class RENDER_PT_shading(RenderButtonsPanel):
     bl_label = "Shading"
@@ -286,6 +316,12 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
         sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
         sub.prop(rd, "edge_color", text="")
 
+        layout.separator()
+
+        split = layout.split()
+        col = split.column()
+        col.prop(rd, "freestyle", text="Freestyle")
+
 
 class RENDER_PT_output(RenderButtonsPanel):
     bl_label = "Output"
@@ -630,12 +666,12 @@ class RENDER_PT_bake(RenderButtonsPanel):
         wide_ui = context.region.width > narrowui
 
         layout.operator("object.bake_image", icon='RENDER_STILL')
-
+        
         if wide_ui:
             layout.prop(rd, "bake_type")
         else:
             layout.prop(rd, "bake_type", text="")
-
+        
         if rd.bake_type == 'NORMALS':
             if wide_ui:
                 layout.prop(rd, "bake_normal_space")
@@ -643,19 +679,19 @@ class RENDER_PT_bake(RenderButtonsPanel):
                 layout.prop(rd, "bake_normal_space", text="")
         elif rd.bake_type in ('DISPLACEMENT', 'AO'):
             layout.prop(rd, "bake_normalized")
-
+        
         # col.prop(rd, "bake_aa_mode")
         # col.prop(rd, "bake_enable_aa")
-
+        
         layout.separator()
-
+        
         split = layout.split()
 
         col = split.column()
         col.prop(rd, "bake_clear")
         col.prop(rd, "bake_margin")
         col.prop(rd, "bake_quad_split", text="Split")
-
+        
         if wide_ui:
             col = split.column()
         col.prop(rd, "bake_active")
@@ -664,7 +700,7 @@ class RENDER_PT_bake(RenderButtonsPanel):
         sub.prop(rd, "bake_distance")
         sub.prop(rd, "bake_bias")
 
-
+        
 classes = [
     RENDER_MT_presets,
     RENDER_MT_ffmpeg_presets,