blob: c7d5b9cfe4a255bd294f050a828a0cb4ba966231 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import bpy
class DataButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
ob = context.active_object
return (ob and ob.type == 'LATTICE')
class DATA_PT_lattice(DataButtonsPanel):
__idname__ = "DATA_PT_lattice"
__label__ = "Lattice"
def draw(self, context):
lat = context.active_object.data
layout = self.layout
if not lat:
return
row = layout.row()
row.itemR(lat, "points_u")
row.itemR(lat, "interpolation_type_u", expand=True)
row = layout.row()
row.itemR(lat, "points_v")
row.itemR(lat, "interpolation_type_v", expand=True)
row = layout.row()
row.itemR(lat, "points_w")
row.itemR(lat, "interpolation_type_w", expand=True)
row = layout.row()
row.itemR(lat, "outside")
row.itemR(lat, "shape_keys")
bpy.types.register(DATA_PT_lattice)
|