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):
16 rd = scene.render_data
18 split = layout.split()
21 sub.itemR(rd, "render_shadows", text="Shadows")
22 sub.itemR(rd, "render_sss", text="Subsurface Scattering")
23 sub.itemR(rd, "render_envmaps", text="Environment Map")
24 # sub.itemR(rd, "render_radiosity", text="Radio")
27 col.itemR(rd, "render_raytracing", text="Ray Tracing")
29 colsub.active = rd.render_raytracing
30 colsub.itemR(rd, "octree_resolution", text="Octree")
31 col.itemR(rd, "dither_intensity", text="Dither", slider=True)
33 class RENDER_PT_output(RenderButtonsPanel):
36 def draw(self, context):
40 rd = scene.render_data
42 layout.itemR(rd, "output_path")
44 split = layout.split()
47 col.itemR(rd, "file_format", text="Format")
48 if rd.file_format in ("AVIJPEG", "JPEG"):
49 col.itemR(rd, "quality", slider=True)
52 sub.itemR(rd, "color_mode")
53 sub.itemR(rd, "alpha_mode")
55 split = layout.split()
58 sub.itemR(rd, "file_extensions")
59 sub.itemL(text="Distributed Rendering:")
60 sub.itemR(rd, "placeholders")
61 sub.itemR(rd, "no_overwrite")
64 col.itemR(rd, "fields", text="Fields")
66 colsub.active = rd.fields
67 colsub.itemR(rd, "fields_still", text="Still")
68 colsub.row().itemR(rd, "field_order", expand=True)
70 class RENDER_PT_antialiasing(RenderButtonsPanel):
71 __label__ = "Anti-Aliasing"
73 def draw_header(self, context):
74 rd = context.scene.render_data
77 layout.itemR(rd, "antialiasing", text="")
79 def draw(self, context):
81 rd = scene.render_data
84 layout.active = rd.antialiasing
86 split = layout.split()
89 sub.itemL(text="Samples:")
90 sub.row().itemR(rd, "antialiasing_samples", expand=True)
91 sub.itemR(rd, "pixel_filter")
94 col.itemR(rd, "filter_size", text="Size", slider=True)
95 col.itemR(rd, "save_buffers")
97 colsub.active = rd.save_buffers
98 colsub.itemR(rd, "full_sample")
100 class RENDER_PT_render(RenderButtonsPanel):
103 def draw(self, context):
104 scene = context.scene
107 rd = scene.render_data
110 row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
111 row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon=111)
114 row.itemR(rd, "do_composite")
115 row.itemR(rd, "do_sequence")
116 rowsub = layout.row()
117 rowsub.active = rd.do_composite
118 rowsub.itemR(rd, "free_image_textures")
120 split = layout.split()
122 col = split.column(align=True)
123 col.itemL(text="Threads:")
124 col.row().itemR(rd, "threads_mode", expand=True)
125 colsub = col.column()
126 colsub.active = rd.threads_mode == 'THREADS_FIXED'
127 colsub.itemR(rd, "threads")
129 sub = split.column(align=True)
130 sub.itemL(text="Tiles:")
131 sub.itemR(rd, "parts_x", text="X")
132 sub.itemR(rd, "parts_y", text="Y")
134 split = layout.split()
137 sub.itemR(rd, "panorama")
139 # row.itemR(rd, "backbuf")
141 class RENDER_PT_dimensions(RenderButtonsPanel):
142 __label__ = "Dimensions"
144 def draw(self, context):
145 scene = context.scene
148 rd = scene.render_data
150 split = layout.split()
153 sub = col.column(align=True)
154 sub.itemL(text="Resolution:")
155 sub.itemR(rd, "resolution_x", text="X")
156 sub.itemR(rd, "resolution_y", text="Y")
157 sub.itemR(rd, "resolution_percentage", text="")
159 sub.itemL(text="Aspect Ratio:")
160 sub.itemR(rd, "pixel_aspect_x", text="X")
161 sub.itemR(rd, "pixel_aspect_y", text="Y")
163 col = col.column(align=False)
164 col.itemR(rd, "border", text="Border")
165 colsub = col.column()
166 colsub.active = rd.border
167 colsub.itemR(rd, "crop_to_border")
169 col = split.column(align=True)
170 col.itemL(text="Frame Range:")
171 col.itemR(scene, "start_frame", text="Start")
172 col.itemR(scene, "end_frame", text="End")
173 col.itemR(scene, "frame_step", text="Step")
175 col.itemL(text="Frame Rate:")
177 col.itemR(rd, "fps_base",text="/")
179 class RENDER_PT_stamp(RenderButtonsPanel):
182 def draw_header(self, context):
183 rd = context.scene.render_data
186 layout.itemR(rd, "stamp", text="")
188 def draw(self, context):
189 scene = context.scene
190 rd = scene.render_data
193 layout.active = rd.stamp
195 split = layout.split()
198 col.itemR(rd, "stamp_time", text="Time")
199 col.itemR(rd, "stamp_date", text="Date")
200 col.itemR(rd, "stamp_frame", text="Frame")
201 col.itemR(rd, "stamp_camera", text="Scene")
202 col.itemR(rd, "stamp_marker", text="Marker")
203 col.itemR(rd, "stamp_filename", text="Filename")
204 col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
205 col.itemR(rd, "stamp_note", text="Note")
206 colsub = col.column()
207 colsub.active = rd.stamp_note
208 colsub.itemR(rd, "stamp_note_text", text="")
211 sub.itemR(rd, "render_stamp")
212 colsub = sub.column()
213 colsub.active = rd.render_stamp
214 colsub.itemR(rd, "stamp_foreground")
215 colsub.itemR(rd, "stamp_background")
216 colsub.itemR(rd, "stamp_font_size", text="Font Size")
218 bpy.types.register(RENDER_PT_render)
219 bpy.types.register(RENDER_PT_dimensions)
220 bpy.types.register(RENDER_PT_antialiasing)
221 bpy.types.register(RENDER_PT_shading)
222 bpy.types.register(RENDER_PT_output)
223 bpy.types.register(RENDER_PT_stamp)