2.5 Buttons
[blender-staging.git] / release / ui / buttons_data_lattice.py
1
2 import bpy
3
4 class DataButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "data"
8         
9         def poll(self, context):
10                 ob = context.active_object
11                 return (ob and ob.type == 'LATTICE')
12         
13 class DATA_PT_lattice(DataButtonsPanel):
14         __idname__ = "DATA_PT_lattice"
15         __label__ = "Lattice"
16
17         def draw(self, context):
18                 lat = context.active_object.data
19                 layout = self.layout
20
21                 row = layout.row()
22                 row.itemR(lat, "points_u")
23                 row.itemR(lat, "interpolation_type_u", expand=True)
24                 
25                 row = layout.row()
26                 row.itemR(lat, "points_v")
27                 row.itemR(lat, "interpolation_type_v", expand=True)
28                 
29                 row = layout.row()
30                 row.itemR(lat, "points_w")
31                 row.itemR(lat, "interpolation_type_w", expand=True)
32                 
33                 row = layout.row()
34                 row.itemR(lat, "outside")
35                 row.itemR(lat, "shape_keys")
36
37 bpy.types.register(DATA_PT_lattice)