Thursday, March 22, 2007

Blender Library

Blender Library is a Python script for Blender intended to provide an easy way to store, manage and retrieve frecuently used items; such as materials, textures, objects, etc.

It also has built in import and export options to help share your items with the rest of the user comunity.

Since the script is merely and interface built on top of the current Blender appending system (SHIFT F1) it will be most likely compatible with all future enhancements in upcoming Blender releases. As an example the material library was coded before the new Material Nodes and without changes in the script it can now store materials with nodes.



To install, just place the script and the image in your Blender scripts folder. It register itself in the Object Scripts menu. The best way to run it is to split a Space side by side, switch it to Scripts and choose Blender Library from SCRIPTS -> OBJECT in the space header.

The first time you run it, it will ask you to choose a folder to store library content. Choose a folder and the library directory will be created there. If you choose C:\ for example, library will be C:\BlenderLib\
If you loose your settings or want to reuse an existing library in other blender installation, just choose the existing library folder in the previous step and the script will recognize it, gainning you access to all your previous items.

There are separated libraries for each type of items you can store. Currently there are libraries for:
Actions, Armatures, Cameras, IPOs, Lamps, Lattices, Logic Bricks, Materials, Objects,
Particle Settings, Paths, Poses, Scenes, Textures, Worlds.

Lamp library and Object library can store several lamps or objects in the same library item. This mean you can store lamps sets to properly light a scene or to store a full character made of diferent meshes and curves with its corresponding armature. The rest of the libraries can only store a single Blender datablock.

Despite this, when you add an item to the library it will also add all the stuff is related to it. If you add a object, its materials, textures, ipos, etc are also added. If you add a material, the textures it uses are also added.

Version 1.3.4 Download

13 comments:

Anonymous said...

Hello Mariano,
Your script works beautifully with Blender 2.43. I was very happy to see you back on the web with this update. I look forward to your future projects.
Thanks for all your hard work,
David W.(aka Blend3d)

Pepijn said...

Hi There, I really like the idea of your library sadly it doesnot seem to work.. the console tells me:
AttributeError: "Blender RenderData" object has no atribute "enableUnifiedRenderer"

Am I doing somthing wrong?

Anonymous said...

I've encountered the same error.
Just open the file blender_library.py in the text editor, search for the string rc.enableUnifiedRenderer(1) and comment it out with the # symbol. It fixes everything

Anonymous said...

Hi Mariano,
are you still developing this nice library script? In 2.44 I still have some bugs. Do you plan an new version? If yes, when? *g

TOTAL ITEMS IN Material: 0
Blender.Scene.getCurrent() is deprecated,
use Blender.Scene.GetCurrent() instead.
scene.link(ob) deprecated!
use scene.objects.link(ob) instead
Traceback (most recent call last):
File "string", line 784, in button_event
File "string", line 1836, in save_mat
File "string", line 1676, in prepare_scene
AttributeError: 'Blender RenderData' object has no attribute 'enableUnifiedRende
rer'

eyemeansit said...

I have this working very nicely in 2.45 with Python 2.5. I have been through nearly every materials tutorial I could find, and although I've made some progress, I am still a long way from getting my brain wrapped around the Blender materials system. Having a "materials library" will get me past some roadblocks on a few projects. What a great idea. I hope to see it go forward and eventually become integrated somehow into the main Blender code. THANK YOU so much!

Anonymous said...

File "< string >", line 1, in < module >
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\blender_lib
rary.py", line 138
SyntaxError: Non-ASCII character '\xb4' in file C:\Program Files\Blender Foundat
ion\Blender\.blender\scripts\blender_library.py on line 138, but no encoding dec
lared; see http://www.python.org/peps/pep-0263.html for details

Can anyone help me with this?
tibicen(at)tlen.pl

Anonymous said...

i fixed the syntax errors and commented a line 1676 out which caused problems.

http://www.megaupload.com/?d=8CAD5YWW

is this project dead or will we get an official fix?

Pedro Lara said...

Hi Mariano:

My name is Pedro Lara, I work as a vfx compositor for films, and occasionally I do my own CG for other VFX projects I do on my own. I'm interested on the potential of blender as a tool for CG / compositing for visual effects.
Have you crossed anyone interested on the same subjects? There are a few specific needs for VFX that could be implemented as plugins or even features for future versions I would like to discuss.
Any help/glint will be welcome.

Bruce Westfall said...

Looks like it's time to clean out the comment list! Spam, spam everywhere...

Nice looking script. Haven't tried it yet, but looking forward to giving it a shot.

Anonymous said...

I'm testing this script with Blender 2.48b on AmigaOS 4, and had to make a few changes, like:
'import os' instead of 'import posix' and removed the 'os=' and 'path=' as importing nt or posix both fail here.

I got the non-ASCII char error as well, and it was just a matter of replacing all the apostrophes: ' (char 180) with the one printed by the keyboard (char 39)

Also commented out line 1676 and it runs fine now.

Minor issues but the script points to obsolete websites.

Anonymous said...

Hi There, I really like the idea of your library sadly it doesnot seem to work.. the console tells me: AttributeError: "Blender RenderData" object has no atribute "enableUnifiedRenderer"

Yesilcam arsivler

Anonymous said...

Hi There, I really like the idea of your library sadly it doesnot seem to work.. the console tells me:
AttributeError: "Blender RenderData" object has no atribute "enableUnifiedRenderer"
Am I doing somthing wrong?Pasta Tarifleri Kolay Pastalar

Anonymous said...

Are you alive and well? Is this add-on still running around?

Related Scripts