| Home | Trees | Index | Help |
|
|---|
| Module Library |
|
Warning:
This is a new, still experimental module.
Example:
import Blender
from Blender import Library
def f(name):
open_library(name)
def open_library(name):
Library.Open(name)
groups = Library.LinkableGroups()
for db in groups:
print "DATABLOCK %s:" % db
for obname in Library.Datablocks(db):
print obname
if 'Object' in groups:
for obname in Library.Datablocks('Object'):
Library.Load(obname, 'Object', 0) # note the 0...
Library.Update()
Library.Close()
b.Redraw()
b.Window.FileSelector(f, "Choose Library", "*.blend")
| Function Summary | |
|---|---|
Close the currently open library file, if any. | |
Get all datablock objects of the given 'group' available in the currently open library file. | |
| string |
Get the filename of the currently open library file. |
| list of strings |
Get all the linkable group names from the currently open library file. |
Load the given datablock object from the current library file | |
| bool |
Open an existing .blend file. |
Update all links and display lists in Blender. | |
| Function Details |
|---|
Close()Close the currently open library file, if any. |
Datablocks(group)Get all datablock objects of the given 'group' available in the currently open library file.
|
getName()Get the filename of the currently open library file.
|
LinkableGroups()Get all the linkable group names from the currently open library file. These are the available groups for linking with the current scene. Ex: 'Object', 'Mesh', 'Material', 'Text', etc.
|
Load(datablock, group, update=1, linked=0)Load the given datablock object from the current library file
|
Open(filename)Open an existing .blend file. If there was already one open file, it is closed first.
|
Update()Update all links and display lists in Blender. This function should be called after a series ofLoad(datablock, group, 0) calls to
make everything behave nicely.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Sun Feb 11 13:30:19 2007 | http://epydoc.sf.net |