[Addon] Blend Library - Asset manager for materials, objects and nodes

This script aims to read folders that contain blend files, display the content in a list of elements that may be imported. Useful to save custom node setups, materials or objects that will be reuse in other files.

> download Blend Library v0.3.3
Blender wiki : http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Blend_Library

Settings

The folders of the blend files are stored either in the addon preferences or in the settings tab of the tool shelf.

Folder paths are available for:

  • compositing node groups
  • shading node groups
  • texture node groups
  • materials
  • objects
  • groups

Addon preferences

The paths set in addon preferences are accessible in every files and can be set once.
http://vincentgires.com/tools/blender/addons/blend_library/doc/images/blend_library_addon_prefs.png

Custom paths

The paths can also be set in the Settings tab of the Tool Shelf. This can be save with the blend file. The paths set in the addon preferences can still be used if the Use custom paths checkbox is off.

http://vincentgires.com/tools/blender/addons/blend_library/doc/images/blend_library_addon_custom_paths.png

3D View

The Tool Shelf of the 3D view gives access to the library for:

  • materials
  • objects
  • groups
Materials

Objects

Node Editor

The Tool Shelf of the Node Editor gives access to the library for:

  • compositing node groups
  • shading node groups
  • texture node groups

2 Likes

It possible to pack all assett for current scene
mesh append link textures et on a unique zip file ?

Thanks, very very useful :slight_smile:
I have 2 things:
1.groups are placed on 3d cursor, objects not , i think the objects should be placed on 3d cursor too, for fast placing on desire spot
2.after appending object in scene my materials are lost, when source materials was linked, i also think it shouldn’t be …

What do you mean? a blend file is already a file that can contain everything.

  1. Indeed, I don’t understand why the groups uses the cursor and the objects not, this is the same python command. I will take a look. But you gave me an idea : have a checkbox “use cursor”. It should be possible.
  2. I tried it with object that has linked material and it is appended correctly with the material, so I don’t understand what is your issue.

nice one. Ilike

I have discovered it: if file with source material is not in your directory, linked material is lost.
When object is in your directory but linked material is not.
Normallly it doesn’t matter where source file with linked material is, in this case it is problem …
Try solve it please, I cannot copy all blend files into your directory.

Thank you

I can’t reproduce this issue. Do you have errors in the terminal?
What is your OS? I tried the script only on Linux and Windows, so I don’t know what append with MacOS path system. But anyway, I’m using the only python command of the Blender API to append or link datablocks, nothing more. If this is the issue, maybe it should be report in the bug tracker but it’s hard to say if I can’t reproduce it.

Try maybe to reproduce it in simple files with all link in relative and sent it to me. I will take a look.

I have old PC, new PC, and NB, all windows, and this problem is on all of these.

I sent TEST file, Try please set “OBJECTS LIBRARY” as object directory in your plugin.
File: “cylinder with linked red color.blend” has linked material from “source red cube.blend” file.

But if you want use “Cylinder” object into new scene with your plugin, linked red material will be lost,
because “source red cube.blend” file is out “OBJECTS LIBRARY” directory

English is not my native language and i can’t explain it better.
thanks

https://drive.google.com/open?id=0B_cT7r851MlNYWsyRDhXbmZUMjg&authuser=0

I explained myself badly,
I have a file which I put in the blender to link other object files from different directories,
I would like to have a comand “to pack in zip file” going to look for all things linked
that the copy in a directory path as putting on, so if I want to
flounder around the zip file to someone or a render farm, nothing is missing

is mossibile change your script to do this?
Thanks;-)

Ok I get it. Actually, it’s working well on Linux but not on Windows where the material is lost. I don’t know why… I will try to solve that. Weird!

Mmh, this is not really the goal of the script when I started it. But I’m sure that a script that does what you’re looking for exists. Something that makes the linked objects local. Maybe even directly in the normal Blender tools? Does anyone know that?

I’d like to add in the future the choice between global paths like it is right now and project paths that would be all in relative. It should be nice but I think it’s one of the the plan for the Gooseberry project to include an asset manager, so that’s not very useful right now to dive into it, they will do much much better! :slight_smile:

The goal of my script is more to extend the Blender’s tools quickly with nodes, shaders, meshes, materials, etc. that you have created or downloaded and simple paste in a folder.

hi. great addon. but it does not work for me. After giving him the path for objects and groups, I tried to append an object. so, I hit the button for the updating the object list, and it updated it right. However, then I hit the append button and it gave me this error:
Traceback (most recent call last):
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\addons_extern\blender_library.py”, line 566, in execute
import_from_library(datablock=“Object”, folderpath=folderpath, file=filename, selected=object_selected, link=False)
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\addons_extern\blender_library.py”, line 158, in import_from_library
bpy.ops.wm.link(directory=folderpath+"//"+file+"/"+datablock+"/", filepath="//"+file+"/"+datablock+"/"+selected, filename=selected, link=link)
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\modules\bpy\ops.py”, line 188, in call
ret = op_call(self.idname_py(), None, kw)
AttributeError: Calling operator “bpy.ops.wm.link” error, could not be found

location: <unknown location>:-1
I hope you will solve it, thanks again.

hi. great addon. but it does not work for me. After giving him the path for objects and groups, I tried to append an object. so, I hit the button for the updating the object list, and it updated it right. However, then I hit the append button and it gave me this error:
Traceback (most recent call last):
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\addons_extern\blender_library.py”, line 566, in execute
import_from_library(datablock=“Object”, folderpath=folderpath, file=filename, selected=object_selected, link=False)
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\addons_extern\blender_library.py”, line 158, in import_from_library
bpy.ops.wm.link(directory=folderpath+"//"+file+"/"+datablock+"/", filepath="//"+file+"/"+datablock+"/"+selected, filename=selected, link=link)
File “C:\Program Files\Blender\2.70a\blender-2.70a-windows32\2.70\scripts\modules\bpy\ops.py”, line 188, in call
ret = op_call(self.idname_py(), None, kw)
AttributeError: Calling operator “bpy.ops.wm.link” error, could not be found

location: <unknown location>:-1
I hope you will solve it, thanks again.

It’s because you’re using the 2.70 version of Blender. Python API has been changed in the 2.72 release, you need to update to use the script.

If you don’t want to update, try this : http://vincentgires.com/tools/blender/addons/blend_library/v01/blend_library_old_blender.py
Not tested but it should work.

Ok I get it. Actually, it’s working well on Linux but not on Windows where the material is lost. I don’t know why… I will try to solve that. Weird![/QUOTE]

I don’t know why but it works on Windows only if the path of the linked material is absolute. I don’t know if this is a bug of Blender’s API or if I did something wrong. On Linux, no problem at all with absolute or relative path. If someone has an idea, please tell me.

If you want to use the script, you can convert your paths to absolute (File > External Data > Make all paths absolute). I know this is not perfect but I it should work correctly on Windows.

It works, but I have to convert all my files paths to absolute … I don’t know, if it’s ideal, anyway it works…

Try please to solve problem with placing objects on 3d cursor, then this plugin will be very useful…

Thanks

Version 0.2 with the possibility to import object in the 3D Cursor location. Only available on append mode. Hope you’ll like it.

-> download Blend Library v0.2


Definitely, i can say, it is the most useful plugin of the year.
Never before was so easy to consist the complex scenes from objects database.

Desks, chairs, carpets, … all only a few clicks

Thanks

Hi VincentG, this is great add-on. Thanks for sharing this. Do you have any repo for this add-on, so I can fork/contribute? I have build similar things, but yours seems more mature :slight_smile: