Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Steiblys <imbusy@imbusy.org>2009-10-02 02:29:15 +0400
committerLukas Steiblys <imbusy@imbusy.org>2009-10-02 02:29:15 +0400
commit0677398a649b6b8c293df3ce3c6668f0a3be3bc8 (patch)
tree9d510a5bd23559bf4fae670ed04d7e5d6c12578c /release/scripts/ui/buttons_data_lattice.py
parent59248e9f62006ba05e3098e4d213f3dcb23fe711 (diff)
parentbc942eceacb638735dc4f4f68252c4c207147a70 (diff)
merge from 23153 to 23595soc-2009-imbusy
Diffstat (limited to 'release/scripts/ui/buttons_data_lattice.py')
-rw-r--r--release/scripts/ui/buttons_data_lattice.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/release/scripts/ui/buttons_data_lattice.py b/release/scripts/ui/buttons_data_lattice.py
new file mode 100644
index 00000000000..bc977860330
--- /dev/null
+++ b/release/scripts/ui/buttons_data_lattice.py
@@ -0,0 +1,56 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = 'PROPERTIES'
+ __region_type__ = 'WINDOW'
+ __context__ = "data"
+
+ def poll(self, context):
+ return context.lattice
+
+class DATA_PT_context_lattice(DataButtonsPanel):
+ __show_header__ = False
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ lat = context.lattice
+ space = context.space_data
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(ob, "data")
+ split.itemS()
+ elif lat:
+ split.template_ID(space, "pin_id")
+ split.itemS()
+
+class DATA_PT_lattice(DataButtonsPanel):
+ __label__ = "Lattice"
+
+ def draw(self, context):
+ layout = self.layout
+
+ lat = context.lattice
+
+ 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.itemO("lattice.make_regular")
+ row.itemR(lat, "outside")
+
+bpy.types.register(DATA_PT_context_lattice)
+bpy.types.register(DATA_PT_lattice)