-# This software is distributable under the terms of the GNU
-# General Public License (GPL) v2, the text of which can be found at
-# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
-# using this module constitutes acceptance of the terms of this License.
-
-
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
import bpy
+
class RenderButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
rd = context.scene.render_data
- return (context.scene and rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
+ return (context.scene and rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES)
+
class RENDER_PT_render(RenderButtonsPanel):
bl_label = "Render"
layout.itemR(rd, "display_mode", text="Display")
+
class RENDER_PT_layers(RenderButtonsPanel):
bl_label = "Layers"
bl_default_closed = True
col.itemR(rl, "solid")
col.itemR(rl, "halo")
col.itemR(rl, "ztransp")
-
- col = split.column()
col.itemR(rl, "sky")
+
+ col = split.column()
col.itemR(rl, "edge")
col.itemR(rl, "strand")
+ col.itemR(rl, "freestyle")
if rl.zmask:
split = layout.split()
row.itemR(rl, "pass_refraction")
row.itemR(rl, "pass_refraction_exclude", text="", icon='ICON_X')
+ if rl.freestyle:
+ layout.itemS()
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Freestyle:")
+ freestyle = rl.freestyle_settings
+ col.itemR(freestyle, "sphere_radius", text="Sphere Radius")
+ col.itemR(freestyle, "ridges_and_valleys", text="Ridges and Valleys")
+ col.itemR(freestyle, "suggestive_contours", text="Suggestive Contours")
+ col.itemR(freestyle, "dkr_epsilon", text="Dkr Epsilon")
+
+ col.itemO("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.itemR(module, "is_displayed", text="")
+ row.itemR(module, "module_path", text="")
+ row.itemO("scene.freestyle_module_remove", icon='ICON_X', text="")
+ props = row.itemO("scene.freestyle_module_move_up", icon='VICON_MOVE_UP', text="", properties=True)
+ props.active = (i > 0)
+ props = row.itemO("scene.freestyle_module_move_down", icon='VICON_MOVE_DOWN', text="", properties=True)
+ props.active = (i < len(freestyle.modules) - 1)
+
+
class RENDER_PT_shading(RenderButtonsPanel):
bl_label = "Shading"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemR(rd, "color_management")
col.itemR(rd, "alpha_mode", text="Alpha")
+
class RENDER_PT_performance(RenderButtonsPanel):
bl_label = "Performance"
bl_default_closed = True
sub.active = rd.render_raytracing
sub.itemL(text="Acceleration structure:")
sub.itemR(rd, "raytrace_structure", text="")
- if rd.raytrace_structure == "OCTREE":
+ if rd.raytrace_structure == 'OCTREE':
sub.itemR(rd, "octree_resolution", text="Resolution")
else:
sub.itemR(rd, "use_instances", text="Instances")
sub.itemR(rd, "use_local_coords", text="Local Coordinates")
+
class RENDER_PT_post_processing(RenderButtonsPanel):
bl_label = "Post Processing"
bl_default_closed = True
sub.itemR(rd, "edge_threshold", text="Threshold", slider=True)
sub.itemR(rd, "edge_color", text="")
+ layout.itemS()
+
+ split = layout.split()
+ col = split.column()
+ col.itemR(rd, "freestyle", text="Freestyle")
+
+
class RENDER_PT_output(RenderButtonsPanel):
bl_label = "Output"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
split = layout.split()
split.itemR(rd, "tiff_bit")
+
class RENDER_PT_encoding(RenderButtonsPanel):
bl_label = "Encoding"
bl_default_closed = True
col.itemR(rd, "ffmpeg_multiplex_audio")
col.itemR(rd, "ffmpeg_audio_volume")
+
class RENDER_PT_antialiasing(RenderButtonsPanel):
bl_label = "Anti-Aliasing"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemR(rd, "pixel_filter", text="")
col.itemR(rd, "filter_size", text="Size", slider=True)
+
class RENDER_PT_dimensions(RenderButtonsPanel):
bl_label = "Dimensions"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemL(text="Frame Rate:")
col.itemR(rd, "fps")
- col.itemR(rd, "fps_base",text="/")
+ col.itemR(rd, "fps_base", text="/")
+
class RENDER_PT_stamp(RenderButtonsPanel):
bl_label = "Stamp"