New(type,
name='type')
Creates a new Object.
-
- Parameters:
type -
The Object type: 'Armature', 'Camera', 'Curve', 'Lamp', 'Mesh' or
'Empty'.
(type=string)
name -
The name of the object. By default, the name will be the same as the
object type.
(type=string)
- Returns:
-
The created Object.
Example:
The example below creates a new Lamp object and puts it at the default
location (0, 0, 0) in the current scene:
import Blender
object = Blender.Object.New ('Lamp')
lamp = Blender.Lamp.New ('Spot')
object.link (lamp)
scene = Blender.Scene.getCurrent ()
scene.link (object)
Blender.Redraw()
|