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