Blender Material Repository v0.09a

Here is Blender Material Repository v0.09a, this script has been an idea in the back of my mind for a while, and when I discused it with the artists in this thread:

http://blenderartists.org/forum/showthread.php?p=775717&posted=1

I didn’t get loads of enthusiasum, but, what the heck. Like the version says, this is ALPHA. Meaning it works, but not too well. The only part that works right now is the Local library. So you can click on the World Library buttons all you want, but they don’t do anything (yet). Please check it out and let me know what you think.

You’ll need PIL to run this script:
http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe

(sorry linux/mac users, you’ll have to compile source)

I am planning on having redundant backups, including Blender’s internal image loading in the future if PIL isn’t found. I am not doing so right now, because every time an image is loaded, Blender creates an image object for that image, loads the image, and then stores the image in the .blend file, without any way for my script to remove it, so even though I have a few ideas to get around this, this will mean you’ll end up with HUGE blender scenes after you browse the BMR (when the script is done, and you browse the materials on the 'net).

Here is the script:

http://www.restorides.com/~nerd/bmr.zip

Instructions for use (PLEASE READ!!!):

Unpack the above zip file in the scripts folder. Then, when you run the script, the first thing it will ask you is to setup the settings. MAKE SURE you set the BMR Base Path to the Blender scripts path, or where ever you unpacked render.blend and render.py

Linux and Mac users:

Please be aware that BMR Base Path is also where the script keeps it’s library, so you must have write protection disabled. For future versions of the script, I plan to get around this by using Blenders internal variables such as “userdir” etc…

When you start the script, and after you get past the initial setup screen, you’ll be at the “Upload” screen. This is simple to use, just drop down the menu above the “white box”, and select a material from your scene, the script will then render it, and display it in the white box (which will no longer be white… duh… :P). You can now click “Add to local Library”, and it will “silently” add it to your local library. You may now goto the Local Library Tab and see the material you just uploaded.

Please Note: The Local Library ONLY REFRESHES ONCE right now. If you upload another material, or a few, you’ll have to restart the script before the local library tab will show the materials in the list.

Thanks for viewing this long post! Please leave feedback! I know the script needs lots of work. I was just hoping everyone here could help me steer it in the right direction. Cya!

Interesting… downloading…
My library script has evolved in a direction I cant change now… Its always great to have more options to choose from.
I’ll test it and let you know.

It is great that you replied… I was going to PM you, and talk to you about your script, but I decided it would be best not to. You see, I didn’t actually know about your script until after I started, and, I don’t know how easy it would be to make it across 'net compatible. In anycase, your input is much appreciated, I hope you don’t think I aim sticking my nose up at your script, because that isn’t the case.

Of course no… I really will love to have an alternative. Actually I had to drop development for too many month now and it will be great to have another scripts of this kind, specially since (unfortunaly) scripts in blender are more “proof of concepts” than useful tools, so we need to investigate and come up with different options so someday this may be a built in feature.
Keep it up… Im waiting for the beta :slight_smile:

You haven’t yet replied with bug reports… if you like it, what you thought of it, etc…

waiting (please?!)

do you have screen shots before I try and compile ?

Im still trying to get it to work cause in my system it throws the LONG FILENAME ERROR… maybe because the “Archivos de programa” thing in spanish XP its just a bit longer that “Program files”. I doesn’t work at all in any CVS version using a subfolder, cause of a bug or feature change in Blender… so people dont try it with CVS builds.
Need to get some time to run thru the code… Im very interested in how you will deal with the remote library, a full python installation will be requiered to run the script?
As a request could the interface (specially configuration screen) be a bit more tighter, using less screen space?
Also Im interested in this PIL image library… since Im afraid mine will not work at all with 2.43 :frowning: The image refactor may have change some hacks I was relyng on to load images without cluttering the blend. My script also crashes blender CVS RC1 with half of it features.
May I suggest you wait for official 2.43 before trying anything to complex?
PS1: Are you planning to extend this to more than materials only?
PS2: Didn’t you get my PM?

This works in 2.42a (I hope it still work in 2.43, but CVS makes me wonder):

Its true ,when you load an image using python it sticks in the .blend, and there is no way to remove it (its just the reference path to the image file, it doenst increase .blend size, but it annoying as hell)

WORKAROUND:
Load an image only once (set a flag for this)

Then, for any subsequent image you do this: set the image filename to the new image, and reload the image; something like this…

Img.SetFilename(“NewImageFilename”)
Img.Reload()

done, you will cycle images and there will be just and extra unwanted image on the blend.

Thank you for the PM, I’ve replied.

Here is a screenshot:

http://www.restorides.com/~nerd/bmr-screen.jpg

This script DOESN’T require a full install of Python YET. But it WILL as soon as it has the World Library working.

Also, though it DOES require PIL, I am planning on having backups if you don’t have PIL, so the script can and will still run, though not as well.