RNA: Generic Type Registration
[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
32 class RENDER_PT_image(RenderButtonsPanel):
33         __label__ = "Image"
34         __context__ = "render"
35
36         def draw(self, context):
37                 scene = context.scene
38                 layout = self.layout
39
40                 if not scene:
41                         return
42
43                 rd = scene.render_data
44
45                 layout.column_flow()
46                 layout.itemR(rd, "resolution_x", text="SizeX")
47                 layout.itemR(rd, "resolution_y", text="SizeY")
48                 layout.itemR(rd, "pixel_aspect_x", text="AspX")
49                 layout.itemR(rd, "pixel_aspect_y", text="AspY")
50
51                 layout.row()
52                 layout.itemR(rd, "crop_to_border")
53
54 class RENDER_PT_antialiasing(RenderButtonsPanel):
55         __label__ = "Anti-Aliasing"
56         __context__ = "render"
57
58         def draw(self, context):
59                 scene = context.scene
60                 layout = self.layout
61
62                 if not scene:
63                         return
64
65                 rd = scene.render_data
66
67                 layout.column_flow()
68                 layout.itemR(rd, "antialiasing", text="Enable")
69                 layout.itemR(rd, "antialiasing_samples", text="Samples")
70                 layout.itemR(rd, "pixel_filter")
71                 layout.itemR(rd, "filter_size")
72
73 class RENDER_PT_render(RenderButtonsPanel):
74         __label__ = "Render"
75         __context__ = "render"
76
77         def draw(self, context):
78                 scene = context.scene
79                 layout = self.layout
80
81                 if not scene:
82                         return
83
84                 rd = scene.render_data
85
86                 layout.row()
87                 layout.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE
88                 #layout.itemO("SCREEN_OT_render", text="ANIM", icon=0) # "anim", 1
89
90                 layout.row()
91                 layout.itemR(scene, "start_frame", text="Start")
92                 layout.itemR(scene, "end_frame", text="End")
93                 layout.itemR(scene, "current_frame", text="Frame")
94
95                 layout.row()
96                 layout.itemR(rd, "do_composite")
97                 layout.itemR(rd, "do_sequence")
98
99                 layout.row()
100                 layout.itemL(text="General")
101
102                 layout.row()
103                 layout.itemR(rd, "resolution_percentage", text="Size ")
104                 layout.itemR(rd, "dither_intensity")
105
106                 layout.row()
107                 layout.itemR(rd, "parts_x")
108                 layout.itemR(rd, "parts_y")
109
110                 layout.row()
111                 layout.itemR(rd, "threads")
112                 layout.itemR(rd, "threads_mode")
113
114                 layout.row()
115                 layout.itemR(rd, "fields", text="Fields")
116                 layout.itemR(rd, "field_order", text="Order")
117                 layout.itemR(rd, "fields_still", text="Still")
118
119                 layout.row()
120                 layout.itemL(text="Extra:")
121                 layout.row()
122                 layout.itemR(rd, "border", text="Border Render")
123                 layout.itemR(rd, "panorama")
124
125 bpy.types.register(RENDER_PT_shading)
126 bpy.types.register(RENDER_PT_image)
127 bpy.types.register(RENDER_PT_antialiasing)
128 bpy.types.register(RENDER_PT_render)
129