4 class RenderButtonsPanel(bpy.types.Panel):
5 __space_type__ = "BUTTONS_WINDOW"
6 __region_type__ = "WINDOW"
9 class RENDER_PT_render(RenderButtonsPanel):
12 def draw(self, context):
14 rd = context.scene.render_data
17 row.itemO("SCREEN_OT_render", text="Image", icon='ICON_IMAGE_COL')
18 row.item_booleanO("SCREEN_OT_render", "anim", True, text="Animation", icon='ICON_SEQUENCE')
20 layout.itemR(rd, "display_mode", text="Display")
22 class RENDER_PT_layers(RenderButtonsPanel):
24 __default_closed__ = True
26 def draw(self, context):
29 rd = scene.render_data
32 row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
34 col = row.column(align=True)
35 col.itemO("SCENE_OT_render_layer_add", icon="ICON_ZOOMIN", text="")
36 col.itemO("SCENE_OT_render_layer_remove", icon="ICON_ZOOMOUT", text="")
38 rl = rd.layers[rd.active_layer_index]
40 split = layout.split()
42 col.itemR(scene, "visible_layers", text="Scene")
44 col.itemR(rl, "visible_layers", text="Layer")
46 layout.itemR(rl, "light_override", text="Light")
47 layout.itemR(rl, "material_override", text="Material")
49 split = layout.split()
52 col.itemR(rl, "zmask")
54 row.itemR(rl, "zmask_negate", text="Negate")
56 col.itemR(rl, "all_z")
59 col.itemR(rl, "solid")
61 col.itemR(rl, "ztransp")
66 col.itemR(rl, "strand")
69 split = layout.split()
70 split.itemL(text="Zmask Layers:")
71 split.column().itemR(rl, "zmask_layers", text="")
73 split = layout.split()
75 col.itemL(text="Passes:")
76 col.itemR(rl, "pass_combined")
77 col.itemR(rl, "pass_z")
78 col.itemR(rl, "pass_vector")
79 col.itemR(rl, "pass_normal")
80 col.itemR(rl, "pass_uv")
81 col.itemR(rl, "pass_mist")
82 col.itemR(rl, "pass_object_index")
86 col.itemR(rl, "pass_color")
87 col.itemR(rl, "pass_diffuse")
89 row.itemR(rl, "pass_specular")
90 row.itemR(rl, "pass_specular_exclude", text="", icon="ICON_X")
92 row.itemR(rl, "pass_shadow")
93 row.itemR(rl, "pass_shadow_exclude", text="", icon="ICON_X")
95 row.itemR(rl, "pass_ao")
96 row.itemR(rl, "pass_ao_exclude", text="", icon="ICON_X")
98 row.itemR(rl, "pass_reflection")
99 row.itemR(rl, "pass_reflection_exclude", text="", icon="ICON_X")
101 row.itemR(rl, "pass_refraction")
102 row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_X")
104 class RENDER_PT_shading(RenderButtonsPanel):
105 __label__ = "Shading"
107 def draw(self, context):
109 rd = context.scene.render_data
111 split = layout.split()
114 col.itemR(rd, "render_shadows", text="Shadows")
115 col.itemR(rd, "render_sss", text="Subsurface Scattering")
116 col.itemR(rd, "render_envmaps", text="Environment Map")
119 col.itemR(rd, "render_raytracing", text="Ray Tracing")
120 col.itemR(rd, "alpha_mode", text="Alpha")
122 class RENDER_PT_performance(RenderButtonsPanel):
123 __label__ = "Performance"
124 __default_closed__ = True
126 def draw(self, context):
128 rd = context.scene.render_data
130 split = layout.split()
132 col = split.column(align=True)
133 col.itemL(text="Threads:")
134 col.row().itemR(rd, "threads_mode", expand=True)
135 colsub = col.column()
136 colsub.enabled = rd.threads_mode == 'THREADS_FIXED'
137 colsub.itemR(rd, "threads")
141 sub = col.column(align=True)
142 sub.itemL(text="Tiles:")
143 sub.itemR(rd, "parts_x", text="X")
144 sub.itemR(rd, "parts_y", text="Y")
146 split = layout.split()
149 col.itemL(text="Memory:")
151 row.itemR(rd, "save_buffers")
152 row.enabled = not rd.full_sample
156 col.itemR(rd, "free_image_textures")
157 col.active = rd.use_compositing
160 row.active = rd.render_raytracing
161 row.itemR(rd, "octree_resolution", text="Ray Tracing Octree")
164 class RENDER_PT_post_processing(RenderButtonsPanel):
165 __label__ = "Post Processing"
166 __default_closed__ = True
168 def draw(self, context):
170 rd = context.scene.render_data
172 split = layout.split()
175 col.itemR(rd, "use_compositing")
176 col.itemR(rd, "use_sequencer")
180 row.itemR(rd, "fields", text="Fields")
182 rowsub.active = rd.fields
183 rowsub.itemR(rd, "fields_still", text="Still")
185 rowsub.active = rd.fields
186 rowsub.itemR(rd, "field_order", expand=True)
188 split = layout.split()
190 split.itemR(rd, "dither_intensity", text="Dither", slider=True)
192 class RENDER_PT_output(RenderButtonsPanel):
195 def draw(self, context):
197 rd = context.scene.render_data
199 layout.itemR(rd, "output_path", text="")
201 split = layout.split()
203 col.itemR(rd, "placeholders")
204 col.itemR(rd, "no_overwrite")
207 col.itemR(rd, "file_format", text="")
208 col.itemR(rd, "file_extensions")
210 if rd.file_format in ('AVIJPEG', 'JPEG'):
211 split = layout.split()
212 split.itemR(rd, "color_mode", text="Color")
213 split.itemR(rd, "quality", slider=True)
215 elif rd.file_format == 'OPENEXR':
216 split = layout.split()
218 col.itemR(rd, "color_mode", text="Color")
219 col.itemR(rd, "exr_codec")
221 subsplit = split.split()
222 col = subsplit.column()
223 col.itemR(rd, "exr_half")
224 col.itemR(rd, "exr_zbuf")
225 col = subsplit.column()
226 col.itemR(rd, "exr_preview")
228 elif rd.file_format == 'JPEG2000':
229 split = layout.split()
231 col.itemR(rd, "color_mode", text="Color")
232 col.itemL(text="Depth:")
233 col.row().itemR(rd, "jpeg_depth", expand=True)
236 col.itemR(rd, "jpeg_preset", text="")
237 col.itemR(rd, "jpeg_ycc")
238 col.itemR(rd, "exr_preview")
240 elif rd.file_format in ('CINEON', 'DPX'):
241 split = layout.split()
243 col.itemR(rd, "color_mode", text="Color")
244 col.itemR(rd, "cineon_log", text="Convert to Log")
246 col = split.column(align=True)
247 col.active = rd.cineon_log
248 col.itemR(rd, "cineon_black", text="Black")
249 col.itemR(rd, "cineon_white", text="White")
250 col.itemR(rd, "cineon_gamma", text="Gamma")
252 elif rd.file_format == 'TIFF':
253 split = layout.split()
254 split.itemR(rd, "color_mode", text="Color")
255 split.itemR(rd, "tiff_bit")
258 split = layout.split()
259 split.itemR(rd, "color_mode", text="Color")
262 class RENDER_PT_encoding(RenderButtonsPanel):
263 __label__ = "Encoding"
264 __default_closed__ = True
266 def poll(self, context):
267 rd = context.scene.render_data
268 return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
270 def draw(self, context):
272 rd = context.scene.render_data
274 split = layout.split()
275 split.itemR(rd, "ffmpeg_format")
276 if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
277 split.itemR(rd, "ffmpeg_codec")
281 split = layout.split()
284 col.itemR(rd, "ffmpeg_video_bitrate")
285 col.itemL(text="Rate:")
286 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
287 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
288 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
291 col.itemR(rd, "ffmpeg_gopsize")
292 col.itemR(rd, "ffmpeg_autosplit")
293 col.itemL(text="Mux:")
294 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
295 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
298 row.itemL(text="Audio:")
300 row.itemR(rd, "ffmpeg_audio_codec")
302 split = layout.split()
305 col.itemR(rd, "ffmpeg_audio_bitrate")
307 col.itemR(rd, "ffmpeg_multiplex_audio")
309 class RENDER_PT_antialiasing(RenderButtonsPanel):
310 __label__ = "Anti-Aliasing"
312 def draw_header(self, context):
314 rd = context.scene.render_data
316 layout.itemR(rd, "antialiasing", text="")
318 def draw(self, context):
320 rd = context.scene.render_data
322 layout.active = rd.antialiasing
324 split = layout.split()
327 col.row().itemR(rd, "antialiasing_samples", expand=True)
328 col.itemR(rd, "full_sample")
331 col.itemR(rd, "pixel_filter", text="Filter")
332 col.itemR(rd, "filter_size", text="Size", slider=True)
334 class RENDER_PT_dimensions(RenderButtonsPanel):
335 __label__ = "Dimensions"
337 def draw(self, context):
340 scene = context.scene
341 rd = scene.render_data
343 split = layout.split()
346 sub = col.column(align=True)
347 sub.itemL(text="Resolution:")
348 sub.itemR(rd, "resolution_x", text="X")
349 sub.itemR(rd, "resolution_y", text="Y")
350 sub.itemR(rd, "resolution_percentage", text="")
352 sub.itemL(text="Aspect Ratio:")
353 sub.itemR(rd, "pixel_aspect_x", text="X")
354 sub.itemR(rd, "pixel_aspect_y", text="Y")
357 row.itemR(rd, "border", text="Border")
359 rowsub.active = rd.border
360 rowsub.itemR(rd, "crop_to_border", text="Crop")
362 col = split.column(align=True)
363 col.itemL(text="Frame Range:")
364 col.itemR(scene, "start_frame", text="Start")
365 col.itemR(scene, "end_frame", text="End")
366 col.itemR(scene, "frame_step", text="Step")
368 col.itemL(text="Frame Rate:")
370 col.itemR(rd, "fps_base",text="/")
372 class RENDER_PT_stamp(RenderButtonsPanel):
374 __default_closed__ = True
376 def draw_header(self, context):
377 rd = context.scene.render_data
380 layout.itemR(rd, "render_stamp", text="")
382 def draw(self, context):
384 rd = context.scene.render_data
386 layout.active = rd.render_stamp
388 split = layout.split()
391 col.itemR(rd, "stamp_time", text="Time")
392 col.itemR(rd, "stamp_date", text="Date")
393 col.itemR(rd, "stamp_frame", text="Frame")
394 col.itemR(rd, "stamp_scene", text="Scene")
395 col.itemR(rd, "stamp_camera", text="Camera")
396 col.itemR(rd, "stamp_filename", text="Filename")
397 col.itemR(rd, "stamp_marker", text="Marker")
398 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
401 sub.active = rd.render_stamp
402 sub.itemR(rd, "stamp_foreground", slider=True)
403 sub.itemR(rd, "stamp_background", slider=True)
404 sub.itemR(rd, "stamp_font_size", text="Font Size")
406 row = layout.split(percentage=0.2)
407 row.itemR(rd, "stamp_note", text="Note")
409 rowsub.active = rd.stamp_note
410 rowsub.itemR(rd, "stamp_note_text", text="")
412 bpy.types.register(RENDER_PT_render)
413 bpy.types.register(RENDER_PT_dimensions)
414 bpy.types.register(RENDER_PT_antialiasing)
415 bpy.types.register(RENDER_PT_layers)
416 bpy.types.register(RENDER_PT_shading)
417 bpy.types.register(RENDER_PT_post_processing)
418 bpy.types.register(RENDER_PT_performance)
419 bpy.types.register(RENDER_PT_output)
420 bpy.types.register(RENDER_PT_encoding)
421 bpy.types.register(RENDER_PT_stamp)