simple scene script - question

i’m new to python within blender, but do know the basics of python outside blender.

does anyone know how to write a script to create three lamps based on the position of the camera?



Get yourself a copy of the python documentation at
It has all the functions you need in it.

A little tip of the veil lifted… this is how you create an empty:

object = Blender.Object.New('Empty')

You can do pretty much the same with lamp objects… though you’ll want to set it’s type as well and perhaps the rotation.

Getting the camera and it’s location isn’t too hard either… then you can apply that in the setlocation when creating the new lamp.

Done forget you need to link new data to your scene.
also- object is a python keyword, so best not use it.

ob = Blender.Object.New('Empty')
scn= Scene.GetCurrent()
ob.sel= 1