forked from bartvdbraak/blender
dc7d0ef474
* Add Lamp Fallof Curve and Texture Color Ramp panels. * Use button space context data. * A few other minor python layout script updates.
37 lines
813 B
Python
37 lines
813 B
Python
|
|
import bpy
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
__region_type__ = "WINDOW"
|
|
__context__ = "data"
|
|
|
|
def poll(self, context):
|
|
return (context.lattice != None)
|
|
|
|
class DATA_PT_lattice(DataButtonsPanel):
|
|
__idname__ = "DATA_PT_lattice"
|
|
__label__ = "Lattice"
|
|
|
|
def draw(self, context):
|
|
lat = context.lattice
|
|
layout = self.layout
|
|
|
|
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)
|