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.1
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.
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.
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
www.vincentgires.com
Glad you find it nice 🙂
I was looking for an existing addon to manage node groups but the only scripts I found were about material presets which is not very useful for my workflow.
So I tried to code it and it was working very quickly. What’s awesome with Blender is that the code can work for all datablocks, so @collignon_david gave me the idea to include objects and groups.
What I like now is that I can make or download blend file from anywhere with materials and node groups, put those files in the addon folder and everything is reachable in the tool panel.
I’m not a coder at all but Blender is really unlimited with just a little bit of python 😀
www.vincentgires.com
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
www.vincentgires.com
@vincentg the day you take the Blender Market by storm draws near 😉
Live & Learn
Thanks 🙂
Yes, we could maybe reorganize categories but I think that David wants to change the whole forum system with a more advanced one.
I made big improvements in the script. Now, two path systems are available. The global one set in the addon preference and a new local path system set by scene. This is usefull to have asset management by project/file. I know this is a goal of the Gooseberry project and they will for sure do much better than me but it was really fun to code!
I will release it very soon. If you have any ideas, let me know. This is maybe the more useful (at least for me and my workflow) script I made.
www.vincentgires.com
This looks super useful, and looks like a good fit to how I work currently. I will test it and give you some feedback if I have some to share, thanks a lot!
I released a new version of the script with custom paths that can be save in the blend file and switch with the global paths, plus some new features such as the possibility to assign material from the library list and to add node directly on the tree.
There is now a wiki page on the Blender website : http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Blend_Library
I’ve just updated the first post of the topic, hope you’ll like it! 🙂
www.vincentgires.com
Congrats !!
As always, you’re the first to jump in.
Your Add-on on Blender.org. It looks cool.
Next step, a smash hit on the Blender Market ; I know you’re thinking about it. 😀
Live & Learn
– http://www.3dvf.com/actualite-11318-blend-library-un-gestionnaire-d-assets-sous-blender.html
– http://blenderlounge.fr/blend-library-asset-manager/
Youhou : -)
www.vincentgires.com
Next step, a smash hit on the Blender Market ; I know you’re thinking about it.
I thought about it, but the scripts has some issues for the moment and I don’t want complains because people paid for a buggy script!
Materials are lost in Windows when objects are imported. No problem at all on Linux. I don’t know yet if it’s a bug of the script or of Blender. I use only basic Python command so I don’t understand why it behave like that. (and no idea about MacOS).
I would like also to implement an image preview. I don’t know yet what’s the best way for it but maybe after that, I will take a look to the Blender Market 😉
www.vincentgires.com
Mmm…
As always, be careful with directory separator
-> / on Linux and on Windows (although it accepts / most of the time).
You should use things like :
import os
print(os.sep) # directory separator
path = os.path.join(‘folder_name’, ‘file_name’)
Blender has his own set of wrappers for this :
http://www.blender.org/api/blender_python_api_2_72_release/bpy.path.html
Also bear in mind that things like ‘//…’ don’t exists on Win (C:path for abs or ./path for relative).
I think Linux will remove extra slashes for you anyway.
Not sure it help but those are the first things that come to mind
Live & Learn
There is something weird because the objects are correctly listed both on Windows and Linux. It means that the path is good. But when it is imported on Windows only, the material is lost. The script do not import material, Blender handle it automatically when objects are imported. That’s why I though of a bug of Blender.
Even if I’m not sure, how to report it? I can’t reproduce it in the user interface, this happens only with bpy.ops.wm.append().
www.vincentgires.com
If you can make a ten lines script that fail on Windows, that more than enough to post a bug report.
Upload your test file somewhere, link to it in the bug description and people will look into it.
Maybe in the near future a third bug will be squashed thanks to the bbug ? 😀
Live & Learn
Small update : v0.3.1
– multi selection in the objects library mode is available with checkbox and selected item only is imported if no checkbox is used. I don’t know yet if this is useful to add it in other modes?
– Nikitron of Sverchok’s nodes addon noticed a sort of conflic with his addon in the panel tool. This is now fixed.
www.vincentgires.com
That’s nice, the first time I succeed to post something on the BlenderNation news!
Some people said that the Blender Foundation will do something similar for Goosberry. That’s not really the same goal. If I understood well, they are working on something like a “Production manager”.
There is a news about it : http://gooseberry.blender.org/bam-building-the-asset-manager/ and it will be awesome for team project. It goes way beyond a simple file library system. They want to do a Shotgun software-like (which is quite a lot used in movies productions). For those who don’t know, this is a production manager with tasks for artists, shot/sequence assignment, review, notes, versioning, etc. with an html fontend that could be online.
The goal of my script is not that big!! it’s just a way to store blend files in a folder and append or link them really easily with some some options (assign material to selected objects or import several objects at once in the cursor location) without doing it manually for each item (shift+f1 or ctrl+alt+o to find the right file could be very annoying). You can for example put a node pack like this one in a folder and directly use it in Blender. That’s all, nothing more 🙂
www.vincentgires.com
It’s getting better each release : )
Live & Learn
Outch ! Python API was updated in the 2.76 and makes this script not runnable and reveal my bad programming skill.
Updated 😉
http://vincentgires.com/tools/blender/addons/blend_library/v033/blend_library.py
www.vincentgires.com
You must be logged in to reply to this topic.