4 class RenderButtonsPanel(bpy.types.Panel):
5 __space_type__ = "BUTTONS_WINDOW"
6 __region_type__ = "WINDOW"
9 class RENDER_PT_shading(RenderButtonsPanel):
12 def draw(self, context):
14 rd = context.scene.render_data
16 split = layout.split()
19 sub.itemR(rd, "render_shadows", text="Shadows")
20 sub.itemR(rd, "render_sss", text="Subsurface Scattering")
21 sub.itemR(rd, "render_envmaps", text="Environment Map")
22 # sub.itemR(rd, "render_radiosity", text="Radio")
25 col.itemR(rd, "render_raytracing", text="Ray Tracing")
27 colsub.active = rd.render_raytracing
28 colsub.itemR(rd, "octree_resolution", text="Octree")
29 col.itemR(rd, "dither_intensity", text="Dither", slider=True)
31 class RENDER_PT_output(RenderButtonsPanel):
34 def draw(self, context):
36 rd = context.scene.render_data
38 layout.itemR(rd, "output_path")
40 split = layout.split()
43 col.itemR(rd, "file_extensions")
44 col.itemR(rd, "fields", text="Fields")
46 colsub.active = rd.fields
47 colsub.itemR(rd, "fields_still", text="Still")
48 colsub.row().itemR(rd, "field_order", expand=True)
51 col.itemR(rd, "color_mode")
52 col.itemR(rd, "alpha_mode")
53 col.itemL(text="Distributed Rendering:")
54 col.itemR(rd, "placeholders")
55 col.itemR(rd, "no_overwrite")
58 layout.itemR(rd, "file_format", text="Format")
60 split = layout.split()
64 if rd.file_format in ('AVIJPEG', 'JPEG'):
65 col.itemR(rd, "quality", slider=True)
67 elif rd.file_format == 'OPENEXR':
68 col.itemR(rd, "exr_codec")
69 col.itemR(rd, "exr_half")
71 col.itemR(rd, "exr_zbuf")
72 col.itemR(rd, "exr_preview")
74 elif rd.file_format == 'JPEG2000':
76 row.itemR(rd, "jpeg_preset")
77 split = layout.split()
79 col.itemL(text="Depth:")
80 col.row().itemR(rd, "jpeg_depth", expand=True)
82 col.itemR(rd, "jpeg_ycc")
83 col.itemR(rd, "exr_preview")
85 elif rd.file_format in ('CINEON', 'DPX'):
86 col.itemR(rd, "cineon_log", text="Convert to Log")
88 colsub.active = rd.cineon_log
89 colsub.itemR(rd, "cineon_black", text="Black")
90 colsub.itemR(rd, "cineon_white", text="White")
91 colsub.itemR(rd, "cineon_gamma", text="Gamma")
93 elif rd.file_format == 'TIFF':
94 col.itemR(rd, "tiff_bit")
96 elif rd.file_format == 'FFMPEG':
98 #row.itemR(rd, "ffmpeg_format")
99 #row.itemR(rd, "ffmpeg_codec")
100 split = layout.split()
103 col.itemR(rd, "ffmpeg_video_bitrate")
104 col.itemL(text="Rate:")
105 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
106 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
107 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
110 col.itemR(rd, "ffmpeg_gopsize")
111 col.itemR(rd, "ffmpeg_autosplit")
112 col.itemL(text="Mux:")
113 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
114 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
117 row.itemL(text="Audio:")
119 #row.itemR(rd, "ffmpeg_audio_codec")
121 split = layout.split()
124 col.itemR(rd, "ffmpeg_audio_bitrate")
126 col.itemR(rd, "ffmpeg_multiplex_audio")
128 class RENDER_PT_antialiasing(RenderButtonsPanel):
129 __label__ = "Anti-Aliasing"
131 def draw_header(self, context):
133 rd = context.scene.render_data
135 layout.itemR(rd, "antialiasing", text="")
137 def draw(self, context):
139 rd = context.scene.render_data
141 layout.active = rd.antialiasing
143 split = layout.split()
146 sub.itemL(text="Samples:")
147 sub.row().itemR(rd, "antialiasing_samples", expand=True)
148 sub.itemR(rd, "pixel_filter")
151 col.itemR(rd, "filter_size", text="Size", slider=True)
152 col.itemR(rd, "save_buffers")
153 colsub = col.column()
154 colsub.active = rd.save_buffers
155 colsub.itemR(rd, "full_sample")
157 class RENDER_PT_render(RenderButtonsPanel):
160 def draw(self, context):
162 rd = context.scene.render_data
165 row.itemO("SCREEN_OT_render", text="Render Still", icon='ICON_IMAGE_COL')
166 row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon='ICON_SEQUENCE')
169 row.itemR(rd, "do_composite")
170 row.itemR(rd, "do_sequence")
171 rowsub = layout.row()
172 rowsub.active = rd.do_composite
173 rowsub.itemR(rd, "free_image_textures")
175 split = layout.split()
177 col = split.column(align=True)
178 col.itemL(text="Threads:")
179 col.row().itemR(rd, "threads_mode", expand=True)
180 colsub = col.column()
181 colsub.active = rd.threads_mode == 'THREADS_FIXED'
182 colsub.itemR(rd, "threads")
184 sub = split.column(align=True)
185 sub.itemL(text="Tiles:")
186 sub.itemR(rd, "parts_x", text="X")
187 sub.itemR(rd, "parts_y", text="Y")
189 split = layout.split()
192 sub.itemR(rd, "panorama")
194 # row.itemR(rd, "backbuf")
196 class RENDER_PT_dimensions(RenderButtonsPanel):
197 __label__ = "Dimensions"
199 def draw(self, context):
202 scene = context.scene
203 rd = scene.render_data
205 split = layout.split()
208 sub = col.column(align=True)
209 sub.itemL(text="Resolution:")
210 sub.itemR(rd, "resolution_x", text="X")
211 sub.itemR(rd, "resolution_y", text="Y")
212 sub.itemR(rd, "resolution_percentage", text="")
214 sub.itemL(text="Aspect Ratio:")
215 sub.itemR(rd, "pixel_aspect_x", text="X")
216 sub.itemR(rd, "pixel_aspect_y", text="Y")
218 col = col.column(align=False)
219 col.itemR(rd, "border", text="Border")
220 colsub = col.column()
221 colsub.active = rd.border
222 colsub.itemR(rd, "crop_to_border")
224 col = split.column(align=True)
225 col.itemL(text="Frame Range:")
226 col.itemR(scene, "start_frame", text="Start")
227 col.itemR(scene, "end_frame", text="End")
228 col.itemR(scene, "frame_step", text="Step")
230 col.itemL(text="Frame Rate:")
232 col.itemR(rd, "fps_base",text="/")
234 class RENDER_PT_stamp(RenderButtonsPanel):
237 def draw_header(self, context):
238 rd = context.scene.render_data
241 layout.itemR(rd, "stamp", text="")
243 def draw(self, context):
245 rd = context.scene.render_data
247 layout.active = rd.stamp
249 split = layout.split()
252 col.itemR(rd, "stamp_time", text="Time")
253 col.itemR(rd, "stamp_date", text="Date")
254 col.itemR(rd, "stamp_frame", text="Frame")
255 col.itemR(rd, "stamp_camera", text="Scene")
256 col.itemR(rd, "stamp_marker", text="Marker")
257 col.itemR(rd, "stamp_filename", text="Filename")
258 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
259 col.itemR(rd, "stamp_note", text="Note")
260 colsub = col.column()
261 colsub.active = rd.stamp_note
262 colsub.itemR(rd, "stamp_note_text", text="")
265 sub.itemR(rd, "render_stamp")
266 colsub = sub.column()
267 colsub.active = rd.render_stamp
268 colsub.itemR(rd, "stamp_foreground", slider=True)
269 colsub.itemR(rd, "stamp_background", slider=True)
270 colsub.itemR(rd, "stamp_font_size", text="Font Size")
272 bpy.types.register(RENDER_PT_render)
273 bpy.types.register(RENDER_PT_dimensions)
274 bpy.types.register(RENDER_PT_antialiasing)
275 bpy.types.register(RENDER_PT_shading)
276 bpy.types.register(RENDER_PT_output)
277 bpy.types.register(RENDER_PT_stamp)