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