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:
authorCampbell Barton <ideasman42@gmail.com>2007-01-27 05:15:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-01-27 05:15:14 +0300
commit853785782e5fea7805b05ce834a661271fd24358 (patch)
tree01d26971805920c14b779994a1fd273a29724d20 /source/blender/python/api2_2x/doc/Lattice.py
parentc7b50435dad54393cf948c0772db54451692375c (diff)
Updated docs not to use Object.New() in examples, use scn.objects.*
Bugfix from ZanQdo, MOT files wouldent load in lightwave. also made some minor improvements.
Diffstat (limited to 'source/blender/python/api2_2x/doc/Lattice.py')
-rw-r--r--source/blender/python/api2_2x/doc/Lattice.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/doc/Lattice.py b/source/blender/python/api2_2x/doc/Lattice.py
index f6b84746950..309e54a5f92 100644
--- a/source/blender/python/api2_2x/doc/Lattice.py
+++ b/source/blender/python/api2_2x/doc/Lattice.py
@@ -13,7 +13,6 @@ Example::
from Blender import Lattice, Object, Scene, Modifier
# Make new lattice data
- ob_lattice = Object.New('Lattice')
lattice_data = Lattice.New()
lattice_data.setPartitions(5,5,5)
lattice_data.setKeyTypes(Lattice.LINEAR, Lattice.CARDINAL, Lattice.BSPLINE)
@@ -25,16 +24,14 @@ Example::
co2 = vec[1] - vec[2] * 0.3
co3 = vec[2] * 3
lattice_data.setPoint(y,[co1,co2,co3])
-
- # Link the data to an object
- ob_lattice.link(lattice_data)
-
+
+ # Create a new object from the lattice in the current scene
+ scn = Scene.GetCurrent()
+ ob_lattice = scn.objects.new(lattice_data)
+
# Get an object to deform with this lattice
mySphere = Object.Get('Sphere')
- scn = Scene.getCurrent()
- scn.link(ob_lattice)
-
# Apply lattice modifier
mod= mySphere.modifiers.append(Modifier.Type.LATTICE)
mod[Modifier.Settings.OBJECT] = ob_lattice