From BlenderWiki

Jump to: navigation, search

Module

Object gives the scripter access to Blender objects. The object module itself has only two methods =new()= and =get()=. Both return an object which can be further manipulated by either using methods of the object or by directly using member variables.

-- Create a new object of type Lamp
lampob = Object.new(Object.Lamp)
-- Create a new object of type Camera with name [[BlenderDev/LuaCam|LuaCam]]
camob = Object.new(Object.Camera, "LuaCam.html")
-- Get an existing Blender object with name "Spot"
lampob2 = Object.get("Spot")

Back