4 class RenderButtonsPanel(bpy.types.Panel):
5 bl_space_type = 'PROPERTIES'
6 bl_region_type = 'WINDOW'
8 # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
10 def poll(self, context):
11 rd = context.scene.render_data
12 return (context.scene and rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
14 class RENDER_PT_render(RenderButtonsPanel):
16 COMPAT_ENGINES = set(['BLENDER_RENDER'])
18 def draw(self, context):
21 rd = context.scene.render_data
24 row.itemO("screen.render", text="Image", icon='ICON_RENDER_STILL')
25 row.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION')
27 layout.itemR(rd, "display_mode", text="Display")
29 class RENDER_PT_layers(RenderButtonsPanel):
31 bl_default_closed = True
32 COMPAT_ENGINES = set(['BLENDER_RENDER'])
34 def draw(self, context):
38 rd = scene.render_data
41 row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
43 col = row.column(align=True)
44 col.itemO("scene.render_layer_add", icon='ICON_ZOOMIN', text="")
45 col.itemO("scene.render_layer_remove", icon='ICON_ZOOMOUT', text="")
47 rl = rd.layers[rd.active_layer_index]
50 layout.itemR(rl, "name")
52 split = layout.split()
55 col.itemR(scene, "visible_layers", text="Scene")
57 col.itemR(rl, "visible_layers", text="Layer")
59 layout.itemR(rl, "light_override", text="Light")
60 layout.itemR(rl, "material_override", text="Material")
63 layout.itemL(text="Include:")
65 split = layout.split()
68 col.itemR(rl, "zmask")
70 row.itemR(rl, "zmask_negate", text="Negate")
72 col.itemR(rl, "all_z")
75 col.itemR(rl, "solid")
77 col.itemR(rl, "ztransp")
82 col.itemR(rl, "strand")
85 split = layout.split()
86 split.itemL(text="Zmask Layers:")
87 split.column().itemR(rl, "zmask_layers", text="")
91 split = layout.split()
94 col.itemL(text="Passes:")
95 col.itemR(rl, "pass_combined")
96 col.itemR(rl, "pass_z")
97 col.itemR(rl, "pass_vector")
98 col.itemR(rl, "pass_normal")
99 col.itemR(rl, "pass_uv")
100 col.itemR(rl, "pass_mist")
101 col.itemR(rl, "pass_object_index")
105 col.itemR(rl, "pass_color")
106 col.itemR(rl, "pass_diffuse")
108 row.itemR(rl, "pass_specular")
109 row.itemR(rl, "pass_specular_exclude", text="", icon='ICON_X')
111 row.itemR(rl, "pass_shadow")
112 row.itemR(rl, "pass_shadow_exclude", text="", icon='ICON_X')
114 row.itemR(rl, "pass_ao")
115 row.itemR(rl, "pass_ao_exclude", text="", icon='ICON_X')
117 row.itemR(rl, "pass_reflection")
118 row.itemR(rl, "pass_reflection_exclude", text="", icon='ICON_X')
120 row.itemR(rl, "pass_refraction")
121 row.itemR(rl, "pass_refraction_exclude", text="", icon='ICON_X')
123 class RENDER_PT_shading(RenderButtonsPanel):
125 COMPAT_ENGINES = set(['BLENDER_RENDER'])
127 def draw(self, context):
130 rd = context.scene.render_data
132 split = layout.split()
135 col.itemR(rd, "render_textures", text="Textures")
136 col.itemR(rd, "render_shadows", text="Shadows")
137 col.itemR(rd, "render_sss", text="Subsurface Scattering")
138 col.itemR(rd, "render_envmaps", text="Environment Map")
141 col.itemR(rd, "render_raytracing", text="Ray Tracing")
142 col.itemR(rd, "color_management")
143 col.itemR(rd, "alpha_mode", text="Alpha")
145 class RENDER_PT_performance(RenderButtonsPanel):
146 bl_label = "Performance"
147 bl_default_closed = True
148 COMPAT_ENGINES = set(['BLENDER_RENDER'])
150 def draw(self, context):
153 rd = context.scene.render_data
155 split = layout.split()
157 col = split.column(align=True)
158 col.itemL(text="Threads:")
159 col.row().itemR(rd, "threads_mode", expand=True)
161 sub.enabled = rd.threads_mode == 'THREADS_FIXED'
162 sub.itemR(rd, "threads")
163 col.itemL(text="Tiles:")
164 col.itemR(rd, "parts_x", text="X")
165 col.itemR(rd, "parts_y", text="Y")
168 col.itemL(text="Memory:")
170 sub.itemR(rd, "save_buffers")
171 sub.enabled = not rd.full_sample
173 sub.active = rd.use_compositing
174 sub.itemR(rd, "free_image_textures")
176 sub.active = rd.render_raytracing
177 sub.itemL(text="Acceleration structure:")
178 sub.itemR(rd, "raytrace_structure", text="")
179 if rd.raytrace_structure == "OCTREE":
180 sub.itemR(rd, "octree_resolution", text="Resolution")
182 sub.itemR(rd, "use_instances", text="Instances")
183 sub.itemR(rd, "use_local_coords", text="Local Coordinates")
185 class RENDER_PT_post_processing(RenderButtonsPanel):
186 bl_label = "Post Processing"
187 bl_default_closed = True
188 COMPAT_ENGINES = set(['BLENDER_RENDER'])
190 def draw(self, context):
193 rd = context.scene.render_data
195 split = layout.split()
198 col.itemR(rd, "use_compositing")
199 col.itemR(rd, "use_sequencer")
202 col.itemR(rd, "dither_intensity", text="Dither", slider=True)
206 split = layout.split()
209 col.itemR(rd, "fields", text="Fields")
211 sub.active = rd.fields
212 sub.row().itemR(rd, "field_order", expand=True)
213 sub.itemR(rd, "fields_still", text="Still")
216 col.itemR(rd, "edge")
219 sub.itemR(rd, "edge_threshold", text="Threshold", slider=True)
220 sub.itemR(rd, "edge_color", text="")
222 class RENDER_PT_output(RenderButtonsPanel):
224 COMPAT_ENGINES = set(['BLENDER_RENDER'])
226 def draw(self, context):
229 rd = context.scene.render_data
231 layout.itemR(rd, "output_path", text="")
233 split = layout.split()
235 col.itemR(rd, "file_format", text="")
236 col.row().itemR(rd, "color_mode", text="Color", expand=True)
239 col.itemR(rd, "file_extensions")
240 col.itemR(rd, "use_overwrite")
241 col.itemR(rd, "use_placeholder")
243 if rd.file_format in ('AVIJPEG', 'JPEG'):
244 split = layout.split()
245 split.itemR(rd, "quality", slider=True)
247 elif rd.file_format == 'OPENEXR':
248 split = layout.split()
251 col.itemL(text="Codec:")
252 col.itemR(rd, "exr_codec", text="")
254 subsplit = split.split()
255 col = subsplit.column()
256 col.itemR(rd, "exr_half")
257 col.itemR(rd, "exr_zbuf")
258 col = subsplit.column()
259 col.itemR(rd, "exr_preview")
261 elif rd.file_format == 'JPEG2000':
262 split = layout.split()
264 col.itemL(text="Depth:")
265 col.row().itemR(rd, "jpeg2k_depth", expand=True)
268 col.itemR(rd, "jpeg2k_preset", text="")
269 col.itemR(rd, "jpeg2k_ycc")
271 elif rd.file_format in ('CINEON', 'DPX'):
272 split = layout.split()
274 col.itemR(rd, "cineon_log", text="Convert to Log")
276 col = split.column(align=True)
277 col.active = rd.cineon_log
278 col.itemR(rd, "cineon_black", text="Black")
279 col.itemR(rd, "cineon_white", text="White")
280 col.itemR(rd, "cineon_gamma", text="Gamma")
282 elif rd.file_format == 'TIFF':
283 split = layout.split()
284 split.itemR(rd, "tiff_bit")
286 class RENDER_PT_encoding(RenderButtonsPanel):
287 bl_label = "Encoding"
288 bl_default_closed = True
289 COMPAT_ENGINES = set(['BLENDER_RENDER'])
291 def poll(self, context):
292 rd = context.scene.render_data
293 return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
295 def draw(self, context):
298 rd = context.scene.render_data
300 split = layout.split()
302 split.itemR(rd, "ffmpeg_format")
303 if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
304 split.itemR(rd, "ffmpeg_codec")
308 split = layout.split()
311 col.itemR(rd, "ffmpeg_video_bitrate")
312 col.itemL(text="Rate:")
313 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
314 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
315 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
318 col.itemR(rd, "ffmpeg_gopsize")
319 col.itemR(rd, "ffmpeg_autosplit")
320 col.itemL(text="Mux:")
321 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
322 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
325 row.itemL(text="Audio:")
327 row.itemR(rd, "ffmpeg_audio_codec")
329 split = layout.split()
332 col.itemR(rd, "ffmpeg_audio_bitrate")
333 col.itemR(rd, "ffmpeg_audio_mixrate")
335 col.itemR(rd, "ffmpeg_multiplex_audio")
336 col.itemR(rd, "ffmpeg_audio_volume")
338 class RENDER_PT_antialiasing(RenderButtonsPanel):
339 bl_label = "Anti-Aliasing"
340 COMPAT_ENGINES = set(['BLENDER_RENDER'])
342 def draw_header(self, context):
343 rd = context.scene.render_data
345 self.layout.itemR(rd, "antialiasing", text="")
347 def draw(self, context):
350 rd = context.scene.render_data
352 layout.active = rd.antialiasing
354 split = layout.split()
357 col.row().itemR(rd, "antialiasing_samples", expand=True)
358 col.itemR(rd, "full_sample")
361 col.itemR(rd, "pixel_filter", text="")
362 col.itemR(rd, "filter_size", text="Size", slider=True)
364 class RENDER_PT_dimensions(RenderButtonsPanel):
365 bl_label = "Dimensions"
366 COMPAT_ENGINES = set(['BLENDER_RENDER'])
368 def draw(self, context):
371 scene = context.scene
372 rd = scene.render_data
374 split = layout.split()
377 sub = col.column(align=True)
378 sub.itemL(text="Resolution:")
379 sub.itemR(rd, "resolution_x", text="X")
380 sub.itemR(rd, "resolution_y", text="Y")
381 sub.itemR(rd, "resolution_percentage", text="")
383 sub.itemL(text="Aspect Ratio:")
384 sub.itemR(rd, "pixel_aspect_x", text="X")
385 sub.itemR(rd, "pixel_aspect_y", text="Y")
388 row.itemR(rd, "use_border", text="Border")
390 rowsub.active = rd.use_border
391 rowsub.itemR(rd, "crop_to_border", text="Crop")
393 col = split.column(align=True)
394 col.itemL(text="Frame Range:")
395 col.itemR(scene, "start_frame", text="Start")
396 col.itemR(scene, "end_frame", text="End")
397 col.itemR(scene, "frame_step", text="Step")
399 col.itemL(text="Frame Rate:")
401 col.itemR(rd, "fps_base",text="/")
403 class RENDER_PT_stamp(RenderButtonsPanel):
405 bl_default_closed = True
406 COMPAT_ENGINES = set(['BLENDER_RENDER'])
408 def draw_header(self, context):
409 rd = context.scene.render_data
411 self.layout.itemR(rd, "render_stamp", text="")
413 def draw(self, context):
416 rd = context.scene.render_data
418 layout.active = rd.render_stamp
420 split = layout.split()
423 col.itemR(rd, "stamp_time", text="Time")
424 col.itemR(rd, "stamp_date", text="Date")
425 col.itemR(rd, "stamp_render_time", text="RenderTime")
426 col.itemR(rd, "stamp_frame", text="Frame")
427 col.itemR(rd, "stamp_scene", text="Scene")
428 col.itemR(rd, "stamp_camera", text="Camera")
429 col.itemR(rd, "stamp_filename", text="Filename")
430 col.itemR(rd, "stamp_marker", text="Marker")
431 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
434 col.active = rd.render_stamp
435 col.itemR(rd, "stamp_foreground", slider=True)
436 col.itemR(rd, "stamp_background", slider=True)
437 col.itemR(rd, "stamp_font_size", text="Font Size")
439 row = layout.split(percentage=0.2)
440 row.itemR(rd, "stamp_note", text="Note")
442 sub.active = rd.stamp_note
443 sub.itemR(rd, "stamp_note_text", text="")
445 bpy.types.register(RENDER_PT_render)
446 bpy.types.register(RENDER_PT_layers)
447 bpy.types.register(RENDER_PT_dimensions)
448 bpy.types.register(RENDER_PT_antialiasing)
449 bpy.types.register(RENDER_PT_shading)
450 bpy.types.register(RENDER_PT_output)
451 bpy.types.register(RENDER_PT_encoding)
452 bpy.types.register(RENDER_PT_performance)
453 bpy.types.register(RENDER_PT_post_processing)
454 bpy.types.register(RENDER_PT_stamp)