1

I am trying to append cameras and lights from one .blend file to another, like this:

with bpy.data.libraries.load(os.path.abspath(camera_file), link=False) as (data_from, data_to):
    print("Importing cameras %s" % (", ").join(data_from.cameras))
    print("Importing light %s" % (", ").join(data_from.lights))
data_to.cameras = data_from.cameras
data_to.light   = data_from.lights

The lists of cameras and lights are output correctly but nothing seems to happen.

What am I doing wrong? I think I should probably import camera and light objects too as objects - but how do I do that?

simone
  • 745
  • 4
  • 14
  • @Duarte: I think Simone wants a python solution... – Chris Mar 21 '22 at 13:20
  • Without Python or without Simone needs be linking Objects, not cameras and lights as in the linked duplicate. We already have plenty of answers covering linking with python https://blender.stackexchange.com/questions/34540/how-to-link-append-a-data-block-using-the-python-api – Duarte Farrajota Ramos Mar 21 '22 at 13:24
  • Then I would recommend linking that python solution – Chris Mar 21 '22 at 13:32

0 Answers0