| Home | Trees | Index | Help |
|
|---|
| Module MeshPrimitives |
|
The Blender.Mesh.Primitives submodule.
New:This submodule provides access Blender's mesh primitives. Each
module function returns a BPy_Mesh object which wraps the mesh data.
This data can then be manipulated using the Mesh API.
from Blender import *
me = Mesh.Primitives.Cube(2.0) # create a new cube of size 2
ob = Object.New('Mesh') # create a new mesh-type object
ob.link(me) # link mesh datablock with object
sc = Scene.GetCurrent() # get current scene
sc.link(ob) # add object to the scene
Window.RedrawAll() # update windows
| Function Summary | |
|---|---|
BPy_Mesh
|
Construct a circle mesh. |
BPy_Mesh
|
Construct a conic mesh (ends filled). |
BPy_Mesh
|
Construct a cube mesh. |
BPy_Mesh
|
Construct a cylindrical mesh (ends filled). |
BPy_Mesh
|
Construct a grid mesh. |
BPy_Mesh
|
Construct a Icosphere mesh. |
BPy_Mesh
|
Construct a Suzanne mesh. |
BPy_Mesh
|
Construct a filled planar mesh with 4 vertices. |
BPy_Mesh
|
Construct a cylindrical mesh (ends not filled). |
BPy_Mesh
|
Construct a UV sphere mesh. |
| Function Details |
|---|
Circle(verts=32, diameter=2.8283999999999998)Construct a circle mesh. The defaults create a circle with a diameter of 2*sqrt(2) Blender units, identical to the Blender UI.
|
Cone(verts=32, diameter=2.8283999999999998, length=1.0)Construct a conic mesh (ends filled). The defaulte create a cone with a base diameter of 2*sqrt(2) Blender units and length 1 unit, identical to the Blender UI.
|
Cube(size=2.0)Construct a cube mesh. The default size creates a cube with each face 2 by 2 Blender units, identical to the Blender UI.
|
Cylinder(verts=32, diameter=2.8283999999999998, length=1.0)Construct a cylindrical mesh (ends filled). The defaults create a cylinder with a diameter of 2*sqrt(2) Blender units and length 1 unit, identical to the Blender UI.
|
Grid(xres=32, yres=32, size=2.0)Construct a grid mesh. The defaults create a 32 by 32 mesh of size 2 Blender units, identical to the Blender UI.
|
Icosphere(subdivisions=2, diameter=2.8282400000000001)Construct a Icosphere mesh. The defaults create sphere with 2 subdivisions and diameter of 2*sqrt(2) Blender units, identical to the Blender UI.
|
Monkey()Construct a Suzanne mesh.
|
Plane(size=2.0)Construct a filled planar mesh with 4 vertices. The default size creates a 2 by 2 Blender unit plane, identical to the Blender UI.
|
Tube(verts=32, diameter=2.8283999999999998, length=1.0)Construct a cylindrical mesh (ends not filled). The defaults create a cylinder with a diameter of 2*sqrt(2) Blender units and length 1 unit, identical to the Blender UI.
|
UVsphere(segments=32, rings=32, diameter=2.8283999999999998)Construct a UV sphere mesh. The defaults create a 32 by 32 sphere with a diameter of 2*sqrt(2) Blender units, identical to the Blender UI.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Jul 13 16:50:05 2006 | http://epydoc.sf.net |