Feature Request - Append function, library management

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Pier.py
Posts: 0
Joined: Fri Dec 10, 2004 9:43 am

Feature Request - Append function, library management

Post by Pier.py »

Hi!
I've got a Christmas wish: to have a new kind of Append function in Blender. :wink:

Me and some other blender users have a discussion about the possibility to make a tools to save/append single materials and objects from a database.
The idea is something like the datablocks in programs like atchitectural cad.
We think a tool like this can really speeds up the workflow when modelling any kind of scene using models and materials from older blender files.
The function is really similar to the append function but we would like to have preview images instead of simple name like "mesh.321" couse to use the actual append method we need to spend a lot of time to manage the external blender files that we use like library. This tools will manage a database ( made up with a system of directory ) where the user can save a single material or a single object with a thubnail to use as preview and where the user can append saved data into the current project.
I also made some preview with gimp and some screenshot of blender :
Image
In this image the user saves the single object into the database and the thubnail used for the preview is a screenshot of the 3d view window selected by the user (top -right). The the user can add name and description.

Image
In this image the user appends a material to the scene browsing the database. ( materials images from Hanzo Shader Library ). To save the materials into the database blender needs to render a default scene ( a sphere with some lamps ) applying the sphere the material selected to be saved.

I produce a lot of interriors animation fore some forniture-shops. I saw a lot of architectural software using a tool like this one to semplify and speed up the job for the users and I think a most powerfull append tool can be used for any kind of blende-production!
What you thik abuot this Request?

-Pier-

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx »

this could be a great improvement.
the ability of having and configuring a visual library of models and materials will be a great time-saving feature imho.

keep up the good work

darko
Posts: 0
Joined: Mon Nov 28, 2005 10:13 pm
Contact:

Post by darko »

great idea! btw, I think this should work not only to choose a material from a set of predefined ones, but could be very useful for IPOs, actions, and other stuff as well.

Pier.py
Posts: 0
Joined: Fri Dec 10, 2004 9:43 am

Post by Pier.py »

Yes, but the goal is to have a tool to build and manage YOU OWN DATABASE in a faster way than the actual append tool, not to have a predefined set of material or object ...

darko
Posts: 0
Joined: Mon Nov 28, 2005 10:13 pm
Contact:

Post by darko »

Pier.py wrote:Yes, but the goal is to have a tool to build and manage YOU OWN DATABASE in a faster way than the actual append tool, not to have a predefined set of material or object ...
That's what I meant! I can already have a lot of materials now, but a tool to manage them in a faster way could be very very useful.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Re: Feature Request - Append function, library management

Post by joeri »

Pier.py wrote: What you thik abuot this Request?
I think it's been requested before.

A visual lib system is something that could be very easy implemented in blender.
Troubles I had with making the image viewer is the changing of the directory structures and the directory contents outside of blender. Things like; is the file I'm presenting still there, does it have the same date and time (ie did somebody overwrite a newer version).
Other troubles are long (and os compatible) file names.

If blender could save a thumb inside the .blend file (and why not, it's got packing) It should be easy for the lib system to retrieve that thumb, and all the lib objects could be saved as one object/material per .blend. Maybe it should call the file name.lib.blend, so they can be opened as a blender file, and the lib viewer window can show the lib.blend files of a folder.

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip »

elubie has a patch that provides image previews of textures etc. Will be in 2.41. Some sort of better library system is being contemplated.

LetterRip

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

LetterRip wrote:elubie has a patch that provides image previews of textures etc. Will be in 2.41. Some sort of better library system is being contemplated.

LetterRip
Image preview of textures is already in blender (?)

elubie
Posts: 0
Joined: Tue Feb 17, 2004 1:12 pm

Post by elubie »

Hi Joeri,

what I have done in a first step, is to use the code that renders the preview of materials, textures, lamp and world datablocks to create small icons that are shown in the popup menu for the materials, textures etc.
And I have added some code to make small icons from images, which are shown in the image popup menu.

This gives a visual hint on the materials which makes it easier to remember which material is what. I've shown this around and gotten some positive feedback, so this will be added soon.

Further I have the idea to extend your image browser to also allow browsing within a library or .blend file and showing the preview for materials, textures, images etc. like it is now done on the preview panel. This is still a little bit in the future ( I might want to clean up the whole file handling stuff a bit first) but definitely on my plans, I hope you don't mind me hacking around there. I have already sucessfully experimented with showing the previews, but there are still a few unfinished things I need to round up before being able to present it.

Also Ton gave me the idea that it would actually be nice to also show a preview for meshes, curves etc. there, which could indeed look very much like the mockup posted by Pier.py. I think this still requires some rewriting of the preview and/or render code, but I'd very much like to give it a try.

I'll update my documentation and post link here tonight so you can take a look if you're interested.

Andrea

Pier.py
Posts: 0
Joined: Fri Dec 10, 2004 9:43 am

Post by Pier.py »

Yes it is!
I wrote this very little script that loads materials or object from an external blender library by selecting an image with the same name of the blender library located into the same directory.
To do that I used the Image selector window... in the old 2.23 the texture were browsed with this kind of window...
An image browser is ok but what I mean is a tool that provides an append like this script (ok this script is orrible but it works! ) and a save method for single object or material. I saw an older Request about the single material saving... Maybe take a look at this :

Code: Select all

import Blender
from Blender import Library
from Blender import Window


Load_Object=1

def my_function(image):
        name = image[:-3]+str("blend")
        open_library(name)
        
        
def open_library(name): 
        Library.Open(name)
        if Load_Object: load_object()
        else: load_material()
        Library.Update()
        Library.Close()
                
def load_object():
        for obname in Library.Datablocks("Object"):
                Library.Load(obname , "Object" , 0 )
                
def load_material():
        for matname in Library.Datablocks("Material"):
                Library.Load(matname , "Material", 0 )

Window.ImageSelector (my_function, 'Load Library')
Blender.Redraw()
This script must be reloaded each time you append something ( this is not good!). I posted it couse my english is really bad and maybe this scrit can explain better what kind of tool I mean :oops:

elubie
Posts: 0
Joined: Tue Feb 17, 2004 1:12 pm

Post by elubie »

Hi Pier.py,

I think I do understand what you want and one part of this - appending from another .blend file from within the 'imagebrowser' will definitely be possible.
My goal is to make the imagebrowser have the same functionality that currently the filebrowser has.

As to the other point, saving single objects, materials etc. into another .blend file sounds nice, but needs some good design and thinking first. I do think your suggestion is a good idea though.

Andrea

TiZeta
Posts: 0
Joined: Tue Nov 29, 2005 2:53 pm
Location: Italy

Post by TiZeta »

I think it's a very good idea, that would speed up a lot the management of a custom database.
:)

uaraus2
Posts: 0
Joined: Thu Nov 10, 2005 1:42 pm
Contact:

Post by uaraus2 »

Pier,
very useful indeed.
... just stop wondering in which blend I've just hidden that material or that other mesh ...
(I definitely need it or a bigger hard disk :D )

Pier.py
Posts: 0
Joined: Fri Dec 10, 2004 9:43 am

Post by Pier.py »

elubie I think to understand that the project you are working around is exactly my wish!
You make me really happy, couse a tool like that can make me able to make some py scripts and introduce blender into the forniture shop of my parent instead sw like arredocad. This will produce a really speed up directly in my workflow, when i'm modelling and when I import scene to my blender renderfarm to render animations.
Finally I will see only linux computers with blender in my shops!!!

Is there any documentation or cvs of your project? Do You need help?my last C code is 5 years old... but I can test anything you want!

Sinistar
Posts: 0
Joined: Mon Nov 28, 2005 10:47 pm
Contact:

Post by Sinistar »

I think it will be a great tool... I hope it will be developed for Blender!

Post Reply