UI: more scene buttons tweaks by Thomas Dinges.
[blender.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__ = "render"
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         __context__ = "render"
39
40         def draw(self, context):
41                 scene = context.scene
42                 layout = self.layout
43
44                 if not scene:
45                         return
46
47                 rd = scene.render_data
48
49                 layout.column_flow()
50                 layout.itemR(rd, "resolution_x", text="SizeX")
51                 layout.itemR(rd, "resolution_y", text="SizeY")
52                 layout.itemR(rd, "pixel_aspect_x", text="AspX")
53                 layout.itemR(rd, "pixel_aspect_y", text="AspY")
54                 
55                 layout.row()
56                 layout.itemR(rd, "quality")
57                 
58                 layout.row()
59                 layout.itemR(rd, "placeholders")
60                 layout.itemR(rd, "no_overwrite")
61                 layout.itemR(rd, "file_extensions")
62                 
63                 layout.row()
64                 layout.itemR(rd, "crop_to_border")
65
66 class RENDER_PT_antialiasing(RenderButtonsPanel):
67         __label__ = "Anti-Aliasing"
68         __context__ = "render"
69
70         def draw(self, context):
71                 scene = context.scene
72                 layout = self.layout
73
74                 if not scene:
75                         return
76
77                 rd = scene.render_data
78
79                 layout.row()
80                 layout.itemR(rd, "antialiasing", text="Enable")
81                 layout.itemR(rd, "filter_size")
82                 layout.row()
83                 layout.itemR(rd, "pixel_filter")
84                 layout.itemR(rd, "antialiasing_samples", text="Samples")
85                 
86                 
87                 layout.row()
88                 layout.itemR(rd, "save_buffers")
89                 if (rd.save_buffers):
90                         layout.itemR(rd, "full_sample")
91
92 class RENDER_PT_render(RenderButtonsPanel):
93         __label__ = "Render"
94         __context__ = "render"
95
96         def draw(self, context):
97                 scene = context.scene
98                 layout = self.layout
99
100                 if not scene:
101                         return
102
103                 rd = scene.render_data
104
105                 layout.row()
106                 layout.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
107                 #layout.itemO("SCREEN_OT_render", text="ANIM", icon=0) # "anim", 1
108
109                 layout.row()
110                 layout.itemR(scene, "start_frame", text="Start")
111                 layout.itemR(scene, "end_frame", text="End")
112                 layout.itemR(scene, "current_frame", text="Frame")
113                 
114                 layout.row()
115                 layout.itemR(rd, "fps")
116                 layout.itemR(rd, "fps_base",text="/")
117                 layout.itemR(scene, "frame_step", text="Step")
118
119                 layout.row()
120                 layout.itemR(rd, "do_composite")
121                 layout.itemR(rd, "do_sequence")
122
123                 layout.row()
124                 layout.itemL(text="General:")
125
126                 layout.column_flow()
127                 layout.itemR(rd, "resolution_percentage", text="Size ")
128                 layout.itemR(rd, "dither_intensity")
129                 layout.itemR(rd, "parts_x")
130                 layout.itemR(rd, "parts_y")
131
132                 layout.row()
133                 layout.itemR(rd, "threads_mode")
134                 if (rd.threads_mode == 'THREADS_FIXED'):
135                         layout.itemR(rd, "threads")
136                 
137                 layout.row()
138                 layout.itemR(rd, "fields", text="Fields")
139                 layout.itemR(rd, "field_order", text="Order")
140                 layout.itemR(rd, "fields_still", text="Still")
141
142                 layout.row()
143                 layout.itemL(text="Extra:")
144                 layout.row()
145                 layout.itemR(rd, "border", text="Border Render")
146                 layout.itemR(rd, "panorama")
147                 layout.itemR(rd, "backbuf")
148
149 bpy.types.register(RENDER_PT_render)
150 bpy.types.register(RENDER_PT_antialiasing)
151 bpy.types.register(RENDER_PT_shading)
152 bpy.types.register(RENDER_PT_image)