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