[Bf-python] Proposed BPyAPI Additions.

Toni Alatalo antont at kyperjokki.fi
Sat Sep 2 12:36:17 CEST 2006


Willian Padovani Germano wrote:

> scene.add(Lamp(name, Lamp.SUN))

+1 from me,
not surprisingly i guess :)

as i tend to like things that look like normal python.. :p

> # or simply
> print scenes.active.name
> scene = scenes.active

scenes coming from .. Scene or Blender?
i have used to think of Blender.act_scene being the active one and 
Blender.scenes all, but don't know now which would prefer.

BTW: in soya and i guess some other engines, it is reversed:
scene = World()
lamp = Lamp(scene, name, Lamp.SUN)
.. then if you parent something to the lamp, you can further do
switch = Mesh(lamp, "light switch") .. and then it uses the parent 
coordsys etc.

i.e. that parent is given to the child 'at birth',
but probably that is not the Blender way (due to both how internals and 
gui work?)
.. decided to mention anyhow as ideas are around now :)

~Toni




More information about the Bf-python mailing list