[Bf-python] Library.Load(datablocklist)

Toni Alatalo antont at kyperjokki.fi
Wed Feb 8 22:08:34 CET 2006


Greetings,

this is not totally necessary, but in the would-be-nice department for Orange 
now (like tomorrow..), and perhaps a central thing in other bigger projects 
with Blender, so am bringing up here and involving Ton too 'cause he knows 
the details of the library code.

we need to replace proxy/working meshes and armatures of our characters in the 
scene/shot blends that have for the project with the final ones for 
rendering. these could not be library linked because of how animating works, 
so currently only way is to just append them to every scene independently. 
i/we can well do this manually but i am also using this opportunity to study 
and enhance the API and automate as much of it as possible - hopefully that 
is also more foolproof (altho i certainly need to do manual cleaning and 
checking too).

the existing bpy Library module works for appending, but afaik only for a 
single file at a time. Bassam is telling me that the objects that together 
are a character (several meshes with actions, shapes, constraints etc.) need 
to be added in a single pass: otherwise relationships between them (and the 
things they use?) get lost. in the GUI shift-f1 append/link load library tool 
that can be done simply by selecting all those objects and loading them.

i spent some time studying the blenloader/intern/readfile which has the 
appending, and the GUI code in src/filesel, but could not figure out how it 
gets the selected files and appends them all. also i cant find what 
differentiates between the different options: use of relative paths and 
appending/linking (these are also not exposed to the py api, i guess the 
default is appending). perhaps Ton could point to how these options are 
given? so then we could try adding them to API..

just realized that i stupidly did not check if the script-version of the 
appending function really has that prob of loosing relations between 
one-by-one appended data, i guess that is a first thing to do for tomorrow, 
but am posting this anyhow if Willian or someone can perhaps look into this 
and if Ton can give us some info.

to rest now,
~Toni



More information about the Bf-python mailing list