Merged changes in the trunk up to revision 28536.
[blender.git] / release / scripts / ui / properties_render.py
index b6137e271b999f5b1ff7ebfc65cba3074402ed94..abed887610ff0c0cfafc22391fe1f88f95d34959 100644 (file)
@@ -124,11 +124,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()
 
@@ -174,6 +175,33 @@ 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, "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, "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"
@@ -287,6 +315,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"
@@ -622,12 +656,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")
@@ -635,19 +669,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")
@@ -656,7 +690,7 @@ class RENDER_PT_bake(RenderButtonsPanel):
         sub.prop(rd, "bake_distance")
         sub.prop(rd, "bake_bias")
 
-
+        
 classes = [
     RENDER_MT_presets,
     RENDER_MT_ffmpeg_presets,