This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/release/ui/buttons_data_lattice.py
Thomas Dinges 5fa80e74a1 2.5 Buttons:
* More Lamp options: Shadow and Spot (WIP, incomplete)
* Added initial lattice panel
2009-05-08 21:52:57 +00:00

40 lines
881 B
Python

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.main.lattices[0]
layout = self.layout
if not lat:
return
layout.row()
layout.itemR(lat, "points_u")
layout.itemR(lat, "interpolation_type_u", expand=True)
layout.row()
layout.itemR(lat, "points_v")
layout.itemR(lat, "interpolation_type_v", expand=True)
layout.row()
layout.itemR(lat, "points_w")
layout.itemR(lat, "interpolation_type_w", expand=True)
layout.row()
layout.itemR(lat, "outside")
layout.itemR(lat, "shape_keys")
bpy.types.register(DATA_PT_lattice)