4 class DataButtonsPanel(bpy.types.Panel):
5 __space_type__ = "BUTTONS_WINDOW"
6 __region_type__ = "WINDOW"
9 def poll(self, context):
10 return (context.lattice != None)
12 class DATA_PT_context(DataButtonsPanel):
13 __idname__ = "DATA_PT_context"
16 def poll(self, context):
17 return (context.object and context.object.type == 'LATTICE')
19 def draw(self, context):
24 space = context.space_data
26 split = layout.split(percentage=0.65)
29 split.template_ID(ob, "data")
32 split.template_ID(space, "pin_id")
36 class DATA_PT_lattice(DataButtonsPanel):
37 __idname__ = "DATA_PT_lattice"
40 def poll(self, context):
41 return (context.object and context.object.type == 'LATTICE')
43 def draw(self, context):
48 space = context.space_data
52 row.itemR(lat, "points_u")
53 row.itemR(lat, "interpolation_type_u", expand=True)
56 row.itemR(lat, "points_v")
57 row.itemR(lat, "interpolation_type_v", expand=True)
60 row.itemR(lat, "points_w")
61 row.itemR(lat, "interpolation_type_w", expand=True)
64 row.itemO("LATTICE_OT_make_regular")
65 row.itemR(lat, "outside")
67 bpy.types.register(DATA_PT_context)
68 bpy.types.register(DATA_PT_lattice)