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, "display_mode", text="Display")
40 layout.itemR(rd, "output_path")
42 split = layout.split()
45 col.itemR(rd, "file_extensions")
46 col.itemR(rd, "fields", text="Fields")
48 colsub.active = rd.fields
49 colsub.itemR(rd, "fields_still", text="Still")
50 colsub.row().itemR(rd, "field_order", expand=True)
53 col.itemR(rd, "color_mode")
54 col.itemR(rd, "alpha_mode")
55 col.itemL(text="Distributed Rendering:")
56 col.itemR(rd, "placeholders")
57 col.itemR(rd, "no_overwrite")
59 layout.itemR(rd, "file_format", text="Format")
61 split = layout.split()
65 if rd.file_format in ('AVIJPEG', 'JPEG'):
66 col.itemR(rd, "quality", slider=True)
68 elif rd.file_format == 'OPENEXR':
69 col.itemR(rd, "exr_codec")
70 col.itemR(rd, "exr_half")
72 col.itemR(rd, "exr_zbuf")
73 col.itemR(rd, "exr_preview")
75 elif rd.file_format == 'JPEG2000':
77 row.itemR(rd, "jpeg_preset")
78 split = layout.split()
80 col.itemL(text="Depth:")
81 col.row().itemR(rd, "jpeg_depth", expand=True)
83 col.itemR(rd, "jpeg_ycc")
84 col.itemR(rd, "exr_preview")
86 elif rd.file_format in ('CINEON', 'DPX'):
87 col.itemR(rd, "cineon_log", text="Convert to Log")
89 colsub.active = rd.cineon_log
90 colsub.itemR(rd, "cineon_black", text="Black")
91 colsub.itemR(rd, "cineon_white", text="White")
92 colsub.itemR(rd, "cineon_gamma", text="Gamma")
94 elif rd.file_format == 'TIFF':
95 col.itemR(rd, "tiff_bit")
97 elif rd.file_format == 'FFMPEG':
99 #row.itemR(rd, "ffmpeg_format")
100 #row.itemR(rd, "ffmpeg_codec")
101 split = layout.split()
104 col.itemR(rd, "ffmpeg_video_bitrate")
105 col.itemL(text="Rate:")
106 col.itemR(rd, "ffmpeg_minrate", text="Minimum")
107 col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
108 col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
111 col.itemR(rd, "ffmpeg_gopsize")
112 col.itemR(rd, "ffmpeg_autosplit")
113 col.itemL(text="Mux:")
114 col.itemR(rd, "ffmpeg_muxrate", text="Rate")
115 col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
118 row.itemL(text="Audio:")
120 #row.itemR(rd, "ffmpeg_audio_codec")
122 split = layout.split()
125 col.itemR(rd, "ffmpeg_audio_bitrate")
127 col.itemR(rd, "ffmpeg_multiplex_audio")
129 class RENDER_PT_antialiasing(RenderButtonsPanel):
130 __label__ = "Anti-Aliasing"
132 def draw_header(self, context):
134 rd = context.scene.render_data
136 layout.itemR(rd, "antialiasing", text="")
138 def draw(self, context):
140 rd = context.scene.render_data
142 layout.active = rd.antialiasing
144 split = layout.split()
147 sub.itemL(text="Samples:")
148 sub.row().itemR(rd, "antialiasing_samples", expand=True)
149 sub.itemR(rd, "pixel_filter")
152 col.itemR(rd, "filter_size", text="Size", slider=True)
153 col.itemR(rd, "save_buffers")
154 colsub = col.column()
155 colsub.active = rd.save_buffers
156 colsub.itemR(rd, "full_sample")
158 class RENDER_PT_render(RenderButtonsPanel):
161 def draw(self, context):
163 rd = context.scene.render_data
166 row.itemO("SCREEN_OT_render", text="Render Still", icon='ICON_IMAGE_COL')
167 row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon='ICON_SEQUENCE')
170 row.itemR(rd, "do_composite")
171 row.itemR(rd, "do_sequence")
172 rowsub = layout.row()
173 rowsub.active = rd.do_composite
174 rowsub.itemR(rd, "free_image_textures")
176 split = layout.split()
178 col = split.column(align=True)
179 col.itemL(text="Threads:")
180 col.row().itemR(rd, "threads_mode", expand=True)
181 colsub = col.column()
182 colsub.active = rd.threads_mode == 'THREADS_FIXED'
183 colsub.itemR(rd, "threads")
185 sub = split.column(align=True)
186 sub.itemL(text="Tiles:")
187 sub.itemR(rd, "parts_x", text="X")
188 sub.itemR(rd, "parts_y", text="Y")
190 split = layout.split()
193 sub.itemR(rd, "panorama")
195 # row.itemR(rd, "backbuf")
197 class RENDER_PT_dimensions(RenderButtonsPanel):
198 __label__ = "Dimensions"
200 def draw(self, context):
203 scene = context.scene
204 rd = scene.render_data
206 split = layout.split()
209 sub = col.column(align=True)
210 sub.itemL(text="Resolution:")
211 sub.itemR(rd, "resolution_x", text="X")
212 sub.itemR(rd, "resolution_y", text="Y")
213 sub.itemR(rd, "resolution_percentage", text="")
215 sub.itemL(text="Aspect Ratio:")
216 sub.itemR(rd, "pixel_aspect_x", text="X")
217 sub.itemR(rd, "pixel_aspect_y", text="Y")
219 col = col.column(align=False)
220 col.itemR(rd, "border", text="Border")
221 colsub = col.column()
222 colsub.active = rd.border
223 colsub.itemR(rd, "crop_to_border")
225 col = split.column(align=True)
226 col.itemL(text="Frame Range:")
227 col.itemR(scene, "start_frame", text="Start")
228 col.itemR(scene, "end_frame", text="End")
229 col.itemR(scene, "frame_step", text="Step")
231 col.itemL(text="Frame Rate:")
233 col.itemR(rd, "fps_base",text="/")
235 class RENDER_PT_stamp(RenderButtonsPanel):
238 def draw_header(self, context):
239 rd = context.scene.render_data
242 layout.itemR(rd, "stamp", text="")
244 def draw(self, context):
246 rd = context.scene.render_data
248 layout.active = rd.stamp
250 split = layout.split()
253 col.itemR(rd, "stamp_time", text="Time")
254 col.itemR(rd, "stamp_date", text="Date")
255 col.itemR(rd, "stamp_frame", text="Frame")
256 col.itemR(rd, "stamp_camera", text="Scene")
257 col.itemR(rd, "stamp_marker", text="Marker")
258 col.itemR(rd, "stamp_filename", text="Filename")
259 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
260 col.itemR(rd, "stamp_note", text="Note")
261 colsub = col.column()
262 colsub.active = rd.stamp_note
263 colsub.itemR(rd, "stamp_note_text", text="")
266 sub.itemR(rd, "render_stamp")
267 colsub = sub.column()
268 colsub.active = rd.render_stamp
269 colsub.itemR(rd, "stamp_foreground", slider=True)
270 colsub.itemR(rd, "stamp_background", slider=True)
271 colsub.itemR(rd, "stamp_font_size", text="Font Size")
273 bpy.types.register(RENDER_PT_render)
274 bpy.types.register(RENDER_PT_dimensions)
275 bpy.types.register(RENDER_PT_antialiasing)
276 bpy.types.register(RENDER_PT_shading)
277 bpy.types.register(RENDER_PT_output)
278 bpy.types.register(RENDER_PT_stamp)