2

Is there a way to append an entire blender file into another one?

I can add everything from each folder with box select but is there a faster way to import everything from a blend file?

Animatoring
  • 1,430
  • 3
  • 26
  • 38
  • 2
    Why don't you duplicate the file or save it under a different name, if both scene are supposed to be exactly the same? – Leander Oct 31 '16 at 08:05
  • 1
    You can add everything from each folder by opening that folder and pressing A once or twice to select that everything. Also you can append whole scene to get the same result. – Mr Zak Oct 31 '16 at 12:32
  • Thanks guys that helped! Unfortunately duplicating the scene wouldn't help too much in this case because the blend file I am appending to has different contents than the one that I'm adding but appending the scene should work. : ) – Animatoring Oct 31 '16 at 13:39

1 Answers1

1

You can use Python API and script your own append.

First recursively iterate through the .blend file using python and then call this function:

from pathlib import Path

def append_from_blend_file(file_name, section_name, object_name): """ Append an object from existing blend file.

:param file_name: Path to a blend file (e.g. actionlib.blend)
:param section_name: Name of a section (e.g. Action)
:param object_name: Name of an object to import. (e.g. WalkCycle)
"""
path = Path(file_name)/section_name/object_name
bpy.ops.wm.append(
    filepath=str(path),
    directory=str(path.parent),
    filename=str(path.name)
    )

```