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.render", text="Image", icon='ICON_IMAGE_COL')
18 row.item_booleanO("screen.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.render_layer_add", icon="ICON_ZOOMIN", text="")
36 col.itemO("scene.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_textures", text="Textures")
115 col.itemR(rd, "render_shadows", text="Shadows")
116 col.itemR(rd, "render_sss", text="Subsurface Scattering")
117 col.itemR(rd, "render_envmaps", text="Environment Map")
120 col.itemR(rd, "render_raytracing", text="Ray Tracing")
121 col.itemR(rd, "color_management")
122 col.itemR(rd, "alpha_mode", text="Alpha")
124 class RENDER_PT_performance(RenderButtonsPanel):
125 __label__ = "Performance"
126 __default_closed__ = True
128 def draw(self, context):
130 rd = context.scene.render_data
132 split = layout.split()
134 col = split.column(align=True)
135 col.itemL(text="Threads:")
136 col.row().itemR(rd, "threads_mode", expand=True)
137 colsub = col.column()
138 colsub.enabled = rd.threads_mode == 'THREADS_FIXED'
139 colsub.itemR(rd, "threads")
143 sub = col.column(align=True)
144 sub.itemL(text="Tiles:")
145 sub.itemR(rd, "parts_x", text="X")
146 sub.itemR(rd, "parts_y", text="Y")
148 split = layout.split()
151 col.itemL(text="Memory:")
153 row.itemR(rd, "save_buffers")
154 row.enabled = not rd.full_sample
158 col.itemR(rd, "free_image_textures")
159 col.active = rd.use_compositing
162 row.active = rd.render_raytracing
163 row.itemR(rd, "octree_resolution", text="Ray Tracing Octree")
166 class RENDER_PT_post_processing(RenderButtonsPanel):
167 __label__ = "Post Processing"
168 __default_closed__ = True
170 def draw(self, context):
172 rd = context.scene.render_data
174 split = layout.split()
177 col.itemR(rd, "use_compositing")
178 col.itemR(rd, "use_sequencer")
182 row.itemR(rd, "fields", text="Fields")
184 rowsub.active = rd.fields
185 rowsub.itemR(rd, "fields_still", text="Still")
187 rowsub.active = rd.fields
188 rowsub.itemR(rd, "field_order", expand=True)
190 split = layout.split()
192 split.itemR(rd, "dither_intensity", text="Dither", slider=True)
194 class RENDER_PT_output(RenderButtonsPanel):
197 def draw(self, context):
199 rd = context.scene.render_data
201 layout.itemR(rd, "output_path", text="")
203 split = layout.split()
205 col.itemR(rd, "placeholders")
206 col.itemR(rd, "no_overwrite")
209 col.itemR(rd, "file_format", text="")
210 col.itemR(rd, "file_extensions")
212 if rd.file_format in ('AVIJPEG', 'JPEG'):
213 split = layout.split()
214 split.itemR(rd, "color_mode", text="Color")
215 split.itemR(rd, "quality", slider=True)
217 elif rd.file_format == 'OPENEXR':
218 split = layout.split()
220 col.itemR(rd, "color_mode", text="Color")
221 col.itemR(rd, "exr_codec")
223 subsplit = split.split()
224 col = subsplit.column()
225 col.itemR(rd, "exr_half")
226 col.itemR(rd, "exr_zbuf")
227 col = subsplit.column()
228 col.itemR(rd, "exr_preview")
230 elif rd.file_format == 'JPEG2000':
231 split = layout.split()
233 col.itemR(rd, "color_mode", text="Color")
234 col.itemL(text="Depth:")
235 col.row().itemR(rd, "jpeg_depth", expand=True)
238 col.itemR(rd, "jpeg_preset", text="")
239 col.itemR(rd, "jpeg_ycc")
240 col.itemR(rd, "exr_preview")
242 elif rd.file_format in ('CINEON', 'DPX'):
243 split = layout.split()
245 col.itemR(rd, "color_mode", text="Color")
246 col.itemR(rd, "cineon_log", text="Convert to Log")
248 col = split.column(align=True)
249 col.active = rd.cineon_log
250 col.itemR(rd, "cineon_black", text="Black")
251 col.itemR(rd, "cineon_white", text="White")
252 col.itemR(rd, "cineon_gamma", text="Gamma")
254 elif rd.file_format == 'TIFF':
255 split = layout.split()
256 split.itemR(rd, "color_mode", text="Color")
257 split.itemR(rd, "tiff_bit")
260 split = layout.split()
261 split.itemR(rd, "color_mode", text="Color")
264 class RENDER_PT_encoding(RenderButtonsPanel):
265 __label__ = "Encoding"
266 __default_closed__ = True
268 def poll(self, context):
269 rd = context.scene.render_data
270 return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
272 def draw(self, context):
274 rd = context.scene.render_data
276 split = layout.split()
277 split.itemR(rd, "ffmpeg_format")
278 if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
279 split.itemR(rd, "ffmpeg_codec")
283 split = layout.split()
286 col.itemR(rd, "ffmpeg_video_bitrate")
287 col.itemL(text="Rate:")
288 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
289 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
290 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
293 col.itemR(rd, "ffmpeg_gopsize")
294 col.itemR(rd, "ffmpeg_autosplit")
295 col.itemL(text="Mux:")
296 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
297 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
300 row.itemL(text="Audio:")
302 row.itemR(rd, "ffmpeg_audio_codec")
304 split = layout.split()
307 col.itemR(rd, "ffmpeg_audio_bitrate")
309 col.itemR(rd, "ffmpeg_multiplex_audio")
311 class RENDER_PT_antialiasing(RenderButtonsPanel):
312 __label__ = "Anti-Aliasing"
314 def draw_header(self, context):
316 rd = context.scene.render_data
318 layout.itemR(rd, "antialiasing", text="")
320 def draw(self, context):
322 rd = context.scene.render_data
324 layout.active = rd.antialiasing
326 split = layout.split()
329 col.row().itemR(rd, "antialiasing_samples", expand=True)
330 col.itemR(rd, "full_sample")
333 col.itemR(rd, "pixel_filter", text="")
334 col.itemR(rd, "filter_size", text="Size", slider=True)
336 class RENDER_PT_dimensions(RenderButtonsPanel):
337 __label__ = "Dimensions"
339 def draw(self, context):
342 scene = context.scene
343 rd = scene.render_data
345 split = layout.split()
348 sub = col.column(align=True)
349 sub.itemL(text="Resolution:")
350 sub.itemR(rd, "resolution_x", text="X")
351 sub.itemR(rd, "resolution_y", text="Y")
352 sub.itemR(rd, "resolution_percentage", text="")
354 sub.itemL(text="Aspect Ratio:")
355 sub.itemR(rd, "pixel_aspect_x", text="X")
356 sub.itemR(rd, "pixel_aspect_y", text="Y")
359 row.itemR(rd, "border", text="Border")
361 rowsub.active = rd.border
362 rowsub.itemR(rd, "crop_to_border", text="Crop")
364 col = split.column(align=True)
365 col.itemL(text="Frame Range:")
366 col.itemR(scene, "start_frame", text="Start")
367 col.itemR(scene, "end_frame", text="End")
368 col.itemR(scene, "frame_step", text="Step")
370 col.itemL(text="Frame Rate:")
372 col.itemR(rd, "fps_base",text="/")
374 class RENDER_PT_stamp(RenderButtonsPanel):
376 __default_closed__ = True
378 def draw_header(self, context):
379 rd = context.scene.render_data
382 layout.itemR(rd, "render_stamp", text="")
384 def draw(self, context):
386 rd = context.scene.render_data
388 layout.active = rd.render_stamp
390 split = layout.split()
393 col.itemR(rd, "stamp_time", text="Time")
394 col.itemR(rd, "stamp_date", text="Date")
395 col.itemR(rd, "stamp_frame", text="Frame")
396 col.itemR(rd, "stamp_scene", text="Scene")
397 col.itemR(rd, "stamp_camera", text="Camera")
398 col.itemR(rd, "stamp_filename", text="Filename")
399 col.itemR(rd, "stamp_marker", text="Marker")
400 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
403 sub.active = rd.render_stamp
404 sub.itemR(rd, "stamp_foreground", slider=True)
405 sub.itemR(rd, "stamp_background", slider=True)
406 sub.itemR(rd, "stamp_font_size", text="Font Size")
408 row = layout.split(percentage=0.2)
409 row.itemR(rd, "stamp_note", text="Note")
411 rowsub.active = rd.stamp_note
412 rowsub.itemR(rd, "stamp_note_text", text="")
414 bpy.types.register(RENDER_PT_render)
415 bpy.types.register(RENDER_PT_layers)
416 bpy.types.register(RENDER_PT_dimensions)
417 bpy.types.register(RENDER_PT_antialiasing)
418 bpy.types.register(RENDER_PT_shading)
419 bpy.types.register(RENDER_PT_output)
420 bpy.types.register(RENDER_PT_encoding)
421 bpy.types.register(RENDER_PT_performance)
422 bpy.types.register(RENDER_PT_post_processing)
423 bpy.types.register(RENDER_PT_stamp)