3d52cfe2c28546b0b555a9ba22db74d28aa17e96
[blender-staging.git] / release / ui / buttons_scene.py
1
2 import bpy
3
4 class RenderButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "scene"
8
9 class RENDER_PT_shading(RenderButtonsPanel):
10         __label__ = "Shading"
11
12         def draw(self, context):
13                 scene = context.scene
14                 layout = self.layout
15
16                 if not scene:
17                         return
18
19                 rd = scene.render_data
20
21                 layout.column_flow()
22                 layout.itemR(rd, "render_shadows", text="Shadows")
23                 layout.itemR(rd, "render_sss", text="SSS")
24                 layout.itemR(rd, "render_envmaps", text="EnvMap")
25                 layout.itemR(rd, "render_radiosity", text="Radio")
26                 
27                 layout.row()
28                 layout.itemR(rd, "render_raytracing", text="Ray Tracing")
29                 layout.itemR(rd, "octree_resolution")
30
31                 layout.row()
32                 layout.itemR(rd, "alpha_mode")
33                 layout.row()
34                 layout.itemR(rd, "free_image_textures")
35
36 class RENDER_PT_image(RenderButtonsPanel):
37         __label__ = "Image"
38
39         def draw(self, context):
40                 scene = context.scene
41                 layout = self.layout
42
43                 if not scene:
44                         return
45
46                 rd = scene.render_data
47
48                 layout.column_flow()
49                 layout.itemR(rd, "resolution_x", text="SizeX")
50                 layout.itemR(rd, "resolution_y", text="SizeY")
51                 layout.itemR(rd, "pixel_aspect_x", text="AspX")
52                 layout.itemR(rd, "pixel_aspect_y", text="AspY")
53                 
54                 layout.row()
55                 layout.itemR(rd, "quality")
56                 
57                 layout.row()
58                 layout.itemR(rd, "placeholders")
59                 layout.itemR(rd, "no_overwrite")
60                 layout.itemR(rd, "file_extensions")
61                 
62                 layout.row()
63                 layout.itemR(rd, "crop_to_border")
64
65 class RENDER_PT_antialiasing(RenderButtonsPanel):
66         __label__ = "Anti-Aliasing"
67
68         def draw(self, context):
69                 scene = context.scene
70                 layout = self.layout
71
72                 if not scene:
73                         return
74
75                 rd = scene.render_data
76
77                 layout.row()
78                 layout.itemR(rd, "antialiasing", text="Enable")
79                 layout.itemR(rd, "filter_size")
80                 layout.row()
81                 layout.itemR(rd, "pixel_filter")
82                 layout.itemR(rd, "antialiasing_samples", text="Samples")
83                 
84                 
85                 layout.row()
86                 layout.itemR(rd, "save_buffers")
87                 if (rd.save_buffers):
88                         layout.itemR(rd, "full_sample")
89
90 class RENDER_PT_render(RenderButtonsPanel):
91         __label__ = "Render"
92
93         def draw(self, context):
94                 scene = context.scene
95                 layout = self.layout
96
97                 if not scene:
98                         return
99
100                 rd = scene.render_data
101
102                 layout.row()
103                 layout.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
104                 #layout.itemO("SCREEN_OT_render", text="ANIM", icon=0) # "anim", 1
105
106                 layout.row()
107                 layout.itemR(scene, "start_frame", text="Start")
108                 layout.itemR(scene, "end_frame", text="End")
109                 layout.itemR(scene, "current_frame", text="Frame")
110                 
111                 layout.row()
112                 layout.itemR(rd, "fps")
113                 layout.itemR(rd, "fps_base",text="/")
114                 layout.itemR(scene, "frame_step", text="Step")
115
116                 layout.row()
117                 layout.itemR(rd, "do_composite")
118                 layout.itemR(rd, "do_sequence")
119
120                 layout.row()
121                 layout.itemL(text="General:")
122
123                 layout.column_flow()
124                 layout.itemR(rd, "resolution_percentage", text="Size ")
125                 layout.itemR(rd, "dither_intensity")
126                 layout.itemR(rd, "parts_x")
127                 layout.itemR(rd, "parts_y")
128
129                 layout.row()
130                 layout.itemR(rd, "threads_mode")
131                 if (rd.threads_mode == 'THREADS_FIXED'):
132                         layout.itemR(rd, "threads")
133                 
134                 layout.row()
135                 layout.itemR(rd, "fields", text="Fields")
136                 layout.itemR(rd, "field_order", text="Order")
137                 layout.itemR(rd, "fields_still", text="Still")
138
139                 layout.row()
140                 layout.itemL(text="Extra:")
141                 layout.row()
142                 layout.itemR(rd, "border", text="Border Render")
143                 layout.itemR(rd, "panorama")
144                 layout.itemR(rd, "backbuf")
145
146 bpy.types.register(RENDER_PT_render)
147 bpy.types.register(RENDER_PT_antialiasing)
148 bpy.types.register(RENDER_PT_shading)
149 bpy.types.register(RENDER_PT_image)