2009-04-15 15:10:31 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
class RenderButtonsPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
|
|
__region_type__ = "WINDOW"
|
2009-04-15 15:10:31 +00:00
|
|
|
__context__ = "render"
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
class RENDER_PT_shading(RenderButtonsPanel):
|
|
|
|
__label__ = "Shading"
|
|
|
|
|
2009-04-15 15:10:31 +00:00
|
|
|
def draw(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
if not scene:
|
|
|
|
return
|
|
|
|
|
|
|
|
rd = scene.render_data
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.column_flow()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "render_shadows", text="Shadows")
|
|
|
|
layout.itemR(rd, "render_sss", text="SSS")
|
|
|
|
layout.itemR(rd, "render_envmaps", text="EnvMap")
|
|
|
|
layout.itemR(rd, "render_radiosity", text="Radio")
|
|
|
|
layout.itemR(rd, "render_raytracing", text="Ray Tracing")
|
|
|
|
layout.itemR(rd, "octree_resolution")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "alpha_mode")
|
2009-04-20 04:58:22 +00:00
|
|
|
layout.row()
|
|
|
|
layout.itemR(rd, "free_image_textures")
|
2009-04-15 15:10:31 +00:00
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
class RENDER_PT_image(RenderButtonsPanel):
|
2009-04-15 15:10:31 +00:00
|
|
|
__label__ = "Image"
|
|
|
|
__context__ = "render"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
if not scene:
|
|
|
|
return
|
|
|
|
|
|
|
|
rd = scene.render_data
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.column_flow()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "resolution_x", text="SizeX")
|
2009-04-16 13:21:18 +00:00
|
|
|
layout.itemR(rd, "resolution_y", text="SizeY")
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "pixel_aspect_x", text="AspX")
|
|
|
|
layout.itemR(rd, "pixel_aspect_y", text="AspY")
|
2009-04-20 04:58:22 +00:00
|
|
|
|
|
|
|
layout.row()
|
|
|
|
layout.itemR(rd, "quality")
|
|
|
|
|
|
|
|
layout.row()
|
|
|
|
layout.itemR(rd, "placeholders")
|
|
|
|
layout.itemR(rd, "no_overwrite")
|
|
|
|
layout.itemR(rd, "file_extensions")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "crop_to_border")
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
class RENDER_PT_antialiasing(RenderButtonsPanel):
|
2009-04-15 15:10:31 +00:00
|
|
|
__label__ = "Anti-Aliasing"
|
|
|
|
__context__ = "render"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
if not scene:
|
|
|
|
return
|
|
|
|
|
|
|
|
rd = scene.render_data
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.column_flow()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "antialiasing", text="Enable")
|
|
|
|
layout.itemR(rd, "antialiasing_samples", text="Samples")
|
|
|
|
layout.itemR(rd, "pixel_filter")
|
|
|
|
layout.itemR(rd, "filter_size")
|
2009-04-20 13:16:17 +00:00
|
|
|
|
|
|
|
layout.row()
|
|
|
|
layout.itemR(rd, "save_buffers")
|
|
|
|
if (rd.save_buffers):
|
|
|
|
layout.itemR(rd, "full_sample")
|
2009-04-15 15:10:31 +00:00
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
class RENDER_PT_render(RenderButtonsPanel):
|
2009-04-15 15:10:31 +00:00
|
|
|
__label__ = "Render"
|
|
|
|
__context__ = "render"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
if not scene:
|
|
|
|
return
|
|
|
|
|
|
|
|
rd = scene.render_data
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
|
|
|
|
#layout.itemO("SCREEN_OT_render", text="ANIM", icon=0) # "anim", 1
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(scene, "start_frame", text="Start")
|
|
|
|
layout.itemR(scene, "end_frame", text="End")
|
|
|
|
layout.itemR(scene, "current_frame", text="Frame")
|
2009-04-20 04:58:22 +00:00
|
|
|
layout.row()
|
|
|
|
layout.itemR(rd, "fps")
|
|
|
|
layout.itemR(rd, "fps_base",text="/")
|
2009-04-15 15:10:31 +00:00
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "do_composite")
|
|
|
|
layout.itemR(rd, "do_sequence")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemL(text="General")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "resolution_percentage", text="Size ")
|
2009-04-20 04:58:22 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "dither_intensity")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "parts_x")
|
|
|
|
layout.itemR(rd, "parts_y")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "threads_mode")
|
2009-04-20 04:58:22 +00:00
|
|
|
if (rd.threads_mode == 'THREADS_FIXED'):
|
|
|
|
layout.itemR(rd, "threads")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "fields", text="Fields")
|
|
|
|
layout.itemR(rd, "field_order", text="Order")
|
|
|
|
layout.itemR(rd, "fields_still", text="Still")
|
|
|
|
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemL(text="Extra:")
|
2009-04-16 12:17:58 +00:00
|
|
|
layout.row()
|
2009-04-15 15:10:31 +00:00
|
|
|
layout.itemR(rd, "border", text="Border Render")
|
|
|
|
layout.itemR(rd, "panorama")
|
2009-04-20 04:58:22 +00:00
|
|
|
layout.itemR(rd, "backbuf")
|
2009-04-15 15:10:31 +00:00
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
bpy.types.register(RENDER_PT_render)
|
2009-04-20 04:58:22 +00:00
|
|
|
bpy.types.register(RENDER_PT_antialiasing)
|
|
|
|
bpy.types.register(RENDER_PT_shading)
|
|
|
|
bpy.types.register(RENDER_PT_image)
|