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")
21 if rd.multiple_engines:
22 layout.itemR(rd, "engine")
24 class RENDER_PT_layers(RenderButtonsPanel):
26 __default_closed__ = True
28 def draw(self, context):
31 rd = scene.render_data
34 row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
36 col = row.column(align=True)
37 col.itemO("scene.render_layer_add", icon="ICON_ZOOMIN", text="")
38 col.itemO("scene.render_layer_remove", icon="ICON_ZOOMOUT", text="")
40 rl = rd.layers[rd.active_layer_index]
42 split = layout.split()
44 col.itemR(scene, "visible_layers", text="Scene")
46 col.itemR(rl, "visible_layers", text="Layer")
48 layout.itemR(rl, "light_override", text="Light")
49 layout.itemR(rl, "material_override", text="Material")
52 layout.itemL(text="Include:")
53 split = layout.split()
56 col.itemR(rl, "zmask")
58 row.itemR(rl, "zmask_negate", text="Negate")
60 col.itemR(rl, "all_z")
63 col.itemR(rl, "solid")
65 col.itemR(rl, "ztransp")
70 col.itemR(rl, "strand")
73 split = layout.split()
74 split.itemL(text="Zmask Layers:")
75 split.column().itemR(rl, "zmask_layers", text="")
79 split = layout.split()
81 col.itemL(text="Passes:")
82 col.itemR(rl, "pass_combined")
83 col.itemR(rl, "pass_z")
84 col.itemR(rl, "pass_vector")
85 col.itemR(rl, "pass_normal")
86 col.itemR(rl, "pass_uv")
87 col.itemR(rl, "pass_mist")
88 col.itemR(rl, "pass_object_index")
92 col.itemR(rl, "pass_color")
93 col.itemR(rl, "pass_diffuse")
95 row.itemR(rl, "pass_specular")
96 row.itemR(rl, "pass_specular_exclude", text="", icon="ICON_X")
98 row.itemR(rl, "pass_shadow")
99 row.itemR(rl, "pass_shadow_exclude", text="", icon="ICON_X")
101 row.itemR(rl, "pass_ao")
102 row.itemR(rl, "pass_ao_exclude", text="", icon="ICON_X")
104 row.itemR(rl, "pass_reflection")
105 row.itemR(rl, "pass_reflection_exclude", text="", icon="ICON_X")
107 row.itemR(rl, "pass_refraction")
108 row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_X")
110 class RENDER_PT_shading(RenderButtonsPanel):
111 __label__ = "Shading"
113 def draw(self, context):
115 rd = context.scene.render_data
117 split = layout.split()
120 col.itemR(rd, "render_textures", text="Textures")
121 col.itemR(rd, "render_shadows", text="Shadows")
122 col.itemR(rd, "render_sss", text="Subsurface Scattering")
123 col.itemR(rd, "render_envmaps", text="Environment Map")
126 col.itemR(rd, "render_raytracing", text="Ray Tracing")
127 col.itemR(rd, "color_management")
128 col.itemR(rd, "alpha_mode", text="Alpha")
130 class RENDER_PT_performance(RenderButtonsPanel):
131 __label__ = "Performance"
132 __default_closed__ = True
134 def draw(self, context):
136 rd = context.scene.render_data
138 split = layout.split()
140 col = split.column(align=True)
141 col.itemL(text="Threads:")
142 col.row().itemR(rd, "threads_mode", expand=True)
143 colsub = col.column()
144 colsub.enabled = rd.threads_mode == 'THREADS_FIXED'
145 colsub.itemR(rd, "threads")
149 sub = col.column(align=True)
150 sub.itemL(text="Tiles:")
151 sub.itemR(rd, "parts_x", text="X")
152 sub.itemR(rd, "parts_y", text="Y")
154 split = layout.split()
157 col.itemL(text="Memory:")
159 row.itemR(rd, "save_buffers")
160 row.enabled = not rd.full_sample
164 col.itemR(rd, "free_image_textures")
165 col.active = rd.use_compositing
168 row.active = rd.render_raytracing
169 row.itemR(rd, "octree_resolution", text="Ray Tracing Octree")
172 class RENDER_PT_post_processing(RenderButtonsPanel):
173 __label__ = "Post Processing"
174 __default_closed__ = True
176 def draw(self, context):
178 rd = context.scene.render_data
180 split = layout.split()
183 col.itemR(rd, "use_compositing")
184 col.itemR(rd, "use_sequencer")
188 row.itemR(rd, "fields", text="Fields")
190 rowsub.active = rd.fields
191 rowsub.itemR(rd, "fields_still", text="Still")
193 rowsub.active = rd.fields
194 rowsub.itemR(rd, "field_order", expand=True)
196 split = layout.split()
198 split.itemR(rd, "dither_intensity", text="Dither", slider=True)
200 class RENDER_PT_output(RenderButtonsPanel):
203 def draw(self, context):
205 rd = context.scene.render_data
207 layout.itemR(rd, "output_path", text="")
209 split = layout.split()
211 col.itemR(rd, "file_format", text="")
212 col.row().itemR(rd, "color_mode", text="Color", expand=True)
215 col.itemR(rd, "file_extensions")
216 col.itemR(rd, "placeholders")
217 col.itemR(rd, "no_overwrite")
219 if rd.file_format in ('AVIJPEG', 'JPEG'):
220 split = layout.split()
221 split.itemR(rd, "quality", slider=True)
223 elif rd.file_format == 'OPENEXR':
224 split = layout.split()
226 col.itemR(rd, "exr_codec")
228 subsplit = split.split()
229 col = subsplit.column()
230 col.itemR(rd, "exr_half")
231 col.itemR(rd, "exr_zbuf")
232 col = subsplit.column()
233 col.itemR(rd, "exr_preview")
235 elif rd.file_format == 'JPEG2000':
236 split = layout.split()
238 col.itemL(text="Depth:")
239 col.row().itemR(rd, "jpeg_depth", expand=True)
242 col.itemR(rd, "jpeg_preset", text="")
243 col.itemR(rd, "jpeg_ycc")
244 col.itemR(rd, "exr_preview")
246 elif rd.file_format in ('CINEON', 'DPX'):
247 split = layout.split()
249 col.itemR(rd, "cineon_log", text="Convert to Log")
251 col = split.column(align=True)
252 col.active = rd.cineon_log
253 col.itemR(rd, "cineon_black", text="Black")
254 col.itemR(rd, "cineon_white", text="White")
255 col.itemR(rd, "cineon_gamma", text="Gamma")
257 elif rd.file_format == 'TIFF':
258 split = layout.split()
259 split.itemR(rd, "tiff_bit")
261 class RENDER_PT_encoding(RenderButtonsPanel):
262 __label__ = "Encoding"
263 __default_closed__ = True
265 def poll(self, context):
266 rd = context.scene.render_data
267 return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
269 def draw(self, context):
271 rd = context.scene.render_data
273 split = layout.split()
274 split.itemR(rd, "ffmpeg_format")
275 if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
276 split.itemR(rd, "ffmpeg_codec")
280 split = layout.split()
283 col.itemR(rd, "ffmpeg_video_bitrate")
284 col.itemL(text="Rate:")
285 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
286 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
287 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
290 col.itemR(rd, "ffmpeg_gopsize")
291 col.itemR(rd, "ffmpeg_autosplit")
292 col.itemL(text="Mux:")
293 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
294 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
297 row.itemL(text="Audio:")
299 row.itemR(rd, "ffmpeg_audio_codec")
301 split = layout.split()
304 col.itemR(rd, "ffmpeg_audio_bitrate")
306 col.itemR(rd, "ffmpeg_multiplex_audio")
308 class RENDER_PT_antialiasing(RenderButtonsPanel):
309 __label__ = "Anti-Aliasing"
311 def draw_header(self, context):
313 rd = context.scene.render_data
315 layout.itemR(rd, "antialiasing", text="")
317 def draw(self, context):
319 rd = context.scene.render_data
321 layout.active = rd.antialiasing
323 split = layout.split()
326 col.row().itemR(rd, "antialiasing_samples", expand=True)
327 col.itemR(rd, "full_sample")
330 col.itemR(rd, "pixel_filter", text="")
331 col.itemR(rd, "filter_size", text="Size", slider=True)
333 class RENDER_PT_dimensions(RenderButtonsPanel):
334 __label__ = "Dimensions"
336 def draw(self, context):
339 scene = context.scene
340 rd = scene.render_data
342 split = layout.split()
345 sub = col.column(align=True)
346 sub.itemL(text="Resolution:")
347 sub.itemR(rd, "resolution_x", text="X")
348 sub.itemR(rd, "resolution_y", text="Y")
349 sub.itemR(rd, "resolution_percentage", text="")
351 sub.itemL(text="Aspect Ratio:")
352 sub.itemR(rd, "pixel_aspect_x", text="X")
353 sub.itemR(rd, "pixel_aspect_y", text="Y")
356 row.itemR(rd, "border", text="Border")
358 rowsub.active = rd.border
359 rowsub.itemR(rd, "crop_to_border", text="Crop")
361 col = split.column(align=True)
362 col.itemL(text="Frame Range:")
363 col.itemR(scene, "start_frame", text="Start")
364 col.itemR(scene, "end_frame", text="End")
365 col.itemR(scene, "frame_step", text="Step")
367 col.itemL(text="Frame Rate:")
369 col.itemR(rd, "fps_base",text="/")
371 class RENDER_PT_stamp(RenderButtonsPanel):
373 __default_closed__ = True
375 def draw_header(self, context):
376 rd = context.scene.render_data
379 layout.itemR(rd, "render_stamp", text="")
381 def draw(self, context):
383 rd = context.scene.render_data
385 layout.active = rd.render_stamp
387 split = layout.split()
390 col.itemR(rd, "stamp_time", text="Time")
391 col.itemR(rd, "stamp_date", text="Date")
392 col.itemR(rd, "stamp_frame", text="Frame")
393 col.itemR(rd, "stamp_scene", text="Scene")
394 col.itemR(rd, "stamp_camera", text="Camera")
395 col.itemR(rd, "stamp_filename", text="Filename")
396 col.itemR(rd, "stamp_marker", text="Marker")
397 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
400 sub.active = rd.render_stamp
401 sub.itemR(rd, "stamp_foreground", slider=True)
402 sub.itemR(rd, "stamp_background", slider=True)
403 sub.itemR(rd, "stamp_font_size", text="Font Size")
405 row = layout.split(percentage=0.2)
406 row.itemR(rd, "stamp_note", text="Note")
408 rowsub.active = rd.stamp_note
409 rowsub.itemR(rd, "stamp_note_text", text="")
411 bpy.types.register(RENDER_PT_render)
412 bpy.types.register(RENDER_PT_layers)
413 bpy.types.register(RENDER_PT_dimensions)
414 bpy.types.register(RENDER_PT_antialiasing)
415 bpy.types.register(RENDER_PT_shading)
416 bpy.types.register(RENDER_PT_output)
417 bpy.types.register(RENDER_PT_encoding)
418 bpy.types.register(RENDER_PT_performance)
419 bpy.types.register(RENDER_PT_post_processing)
420 bpy.types.register(RENDER_PT_stamp)