gather multiple blend files for render

Hi,

I’m trying to gather some differents objets type in a scene to render in batch command.

so i’ve got that :


C:\Program Files\Blender 2.43>blender -P Aload.py -b Test.blend -f 1
Compiled with Python version 2.4.
Warning: could not determine argv[0] path
Checking for installed Python... got it!
DATABLOCK Lamp:
Spot.003 Spot.002 Spot.001 Spot

Fra:1 Mem:6.20M Sce: Scene Ve:8 Fa:6 La:0
Fra:1 Mem:15.96M | Part 1-16
Fra:1 Mem:15.96M | Part 2-16
Fra:1 Mem:15.96M | Part 3-16
Fra:1 Mem:15.96M | Part 4-16
Fra:1 Mem:15.96M | Part 5-16
Fra:1 Mem:15.96M | Part 6-16
Fra:1 Mem:15.96M | Part 7-16
Fra:1 Mem:15.96M | Part 8-16
Fra:1 Mem:15.96M | Part 9-16
Fra:1 Mem:15.96M | Part 10-16
Fra:1 Mem:15.96M | Part 11-16
Fra:1 Mem:15.96M | Part 12-16
Fra:1 Mem:15.96M | Part 13-16
Fra:1 Mem:15.96M | Part 14-16
Fra:1 Mem:15.96M | Part 15-16
Fra:1 Mem:15.96M | Part 16-16
Saved: c:	mp\0001.jpg Time: 00:01.09

Blender quit

the script looks ok into blender
but here we can see that blender fail to append lights :

 Fra:1 Mem:6.20M Sce: Scene Ve:8 Fa:6 La:0

here is my script to import only light in the current render scene (Aload.py) :


import Blender as b
from Blender import Library

def f(name):
    open_library(name)

def open_library(name):
    Library.Open(name)
    groups = Library.LinkableGroups()

    for db in groups:
        if db =="Lamp":
            print "DATABLOCK %s:" % db
            for obname in Library.Datablocks(db):
                print obname,
            print "
"

    if 'Object' in groups:
        for obname in Library.Datablocks('Object'):
            Library.Load(obname, 'Object', 0) # note the 0...
    Library.Update()

    Library.Close()
    b.Redraw()


f("C:\lights.blend")

The Light.blend file contain only light to load into test.blend

I Wouldlike to make the same for camera … but later