Having a large amount of objects in several groups, not being instantiated, I would like to merge them all to a single group. What is the most efficient way to do it using Python API?
A minimal example would be:
- Create a scene with two cubes, add them to Group1, save the file as file1.blend.
- Create a new file with another two cubes, add them to Group2, save the file as file2.blend.
Start a new file and load groups from both using
with bpy.data.libraries.load('file1.blend', link=False) as (data_src, data_dst): data_dst.groups = data_src.groups with bpy.data.libraries.load('file2.blend', link=False) as (data_src, data_dst): data_dst.groups = data_src.groups
- What is the most efficient way using Python API to merge Group1 and Group2 to a single group?