blender/source
Campbell Barton 8c526e79e3 library loading api.
this is not well suited to RNA so this is a native python api.

This uses:
  bpy.data.libraries.load(filepath, link=False, relative=False)

however the return value needs to use pythons context manager, this means the library loading is confined to a block of code and python cant leave a half loaded library state.


eg, load a single scene we know the name of:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = ["Scene"]


eg, load all scenes:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = data_from.scenes


eg, load all objects starting with 'A'
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.objects = [name for name in data_from.objects if name.startswith("A")]

As you can see gives 2 objects like 'bpy.data', but containing lists of strings which can be moved from one into another.
2011-03-12 16:06:37 +00:00
..
blender library loading api. 2011-03-12 16:06:37 +00:00
blenderplayer blenderplayer building again in CMake + OSX (and Linux I guess) patch from IRIE Shinsuke 2011-03-05 09:27:14 +00:00
creator Fix small error in chdir + cmd combination. 2011-03-10 00:21:36 +00:00
darwin remove nan-makefiles 2011-01-30 15:29:22 +00:00
gameengine pass report list along to BLO_blendhandle_from_file(), avoid unlikely crash in the append operator. 2011-03-12 15:15:40 +00:00
icons remove nan-makefiles 2011-01-30 15:29:22 +00:00
kernel doxygen: kernel/gen_system tagged. 2011-02-25 13:25:53 +00:00
tests builder reports MSVC was setting stack size to 2gig. 2011-03-12 04:31:28 +00:00
CMakeLists.txt - fix problem with cmake, windows 'RelWithDebInfo' target, was giving error: "ImportError: No module named _socket" because of copying wrong files over. 2011-01-23 11:42:29 +00:00
SConscript dont build blender/kernel if the game engines disabled. 2010-10-31 00:56:46 +00:00