AssetLibraryTools: Free addon to speed up the creation of Blender 3.0 asset browser libraries

It might be possible to write a quick script to do the “joining”.
Join the discord server linked in the post and ill help you out there if i can.

Thank you. Will do a little later today, I have my nieces and nephews around right now coloring in the x-mas cookies :slight_smile:

1 Like

I wrote to you on the Discord. Have a nice evening.

1 Like

sorry maybe a bit off topic, but is there a way to ask Blòender to re-generate all the material preview?
It has not completed the task and it looks like I should refresh every single preview-missing material one by one.
thank you.

1 Like

as in the asset broswer previews?
Theres a button in assetlibrarytools that does that.
image
“generate asset previews”
Set asset type to material and click generate previews.

Old Post

This looks like a really interesting addon, I do have a question though.
I recently downloaded a large number of assets from a renowned vendor. These downloaded .blend files contain one asset each in the case of trees and multiple assets for grass and small bushes. Now appending the assets all into a single file would be a massive overload of objects, considering that this library is 35gb in size. Since the files are structured to only contain the necessary objects (no cameras nor lights) and only the materials assigned to the objects, would you be able to batch mark all objects within a folder as asset? That way, I could see the previews in the asset browser and drag and drop the assets, without manually going over the 300 files and the individual assets.

E: This addon should be up to the task of batch marking assets from other blend files: Batch mark assets and generate previews from library files

1 Like

WOW GREAT
thank you I’ve missed it.

1 Like

i’ve find a little issue, maybe it may be usefull to know about it for the author or other users.
In my collection there is a “metal” folder.
the jpgs contain “metal” in the files name, it is not for “metalness”, it is just because the material is metal and not (lets say) wood.
I assume the script is cheated by the files name and it fails in creating diffuse and metalness nodes.
Very easy to fix on user side once you understand what is going on.
metal

1 Like

I can confirm that having “Metal” in the name of any of the various texture files being loaded to create a PBR material seems to confuse ALT. Sometimes the AO file, sometimes the DIFFUSE gets connected to the “Metal” input on the Principled BSDF node, and then they do not get connected to their proper inputs.

(LOVE this addon, btw)

1 Like

It appears that filenames that contain “Rough” may be confusing ALT, also. Same symptoms as described above for “Metal”.

Thanks.

1 Like

In addon code it might be beneficial to reverse the filename strings and reverse the strings used to search. That way “esuffid” will be detected and acted upon before “latem” in the case of “gpj.esuffid_49_62_latem_dehsurb”

That way “lamron” will be detected and acted upon before “latem” in the case of “gpj.lamron_49_62_latem_dehsurb”

1 Like

Ill try and improve the way it detects image types when i have time to. Theres many ways i could go about fixing it.

Batch append from .blend files needs a “skip existing”.

I’m trying to bring all polyhaven.com textures into a single blend file. All of their zips contain a .blend with 1 material and a textures subfolder so I couldn’t use Batch Import PBR without manually moving and renaming dozens of “texture” folders first.

I’d like to have a blend file referencing all materials and then the original folder for each material all in 1 folder.

example

./polyhaven.blend
./cobblestone_blend/textures/basecolor.png
./cobblestone_blend/cobblestone.blend
./woodenfence_blend/
... etc...

But batch append from blend file will try to read the currently open blend file if its in that folder which I assume causes an infinite loop and that crashes blender. If the script encounters the currently open file, it should detect all materials within it as duplicates and skip them and move on to the next file.

To avoid blender crashing I saved my .blend file in the root of a folder and made a subfolder named unzipped and put all the texture subfolders in there.

./polyhaven.blend
./unzipped/cobblestone_blend/textures/basecolor.png
./unzipped/cobblestone_blend/cobblestone.blend
./unzipped/ ...etc...

It might also be useful for some users if there was a limit on how many subfolders deep it searched for blend files.

Generating Previews needs an option to skip assets that already have previews.

1 Like

I have a directory of images named using a fairly standard naming scheme, when I try to run this tool I’m getting a ‘0 materials created’ warning and no assets added to my library. Is there some undocumented step I’m missing?

It is documented: each material must be in its own folder.

1 Like

Hi Lucian, thank you for your add-on, absolutely needed. I do perfectly understand the need for each texture sets to be inside its own folder, but in some cases inside a folder there are multiple resolution versions, like 1K, 2K, 8K etc. Which criteria is being applied when choosing which image files to put together in the Principled BSDF shader?
With some texture sets for metal materials, I’ve noticed that sometimes the Color image has not been connected and with some texture sets for metals the Metallicity is not set at 1 in the Principled BSDF. It would be very nice to solve this issues, but I can deal with correcting those problematic imports. Please, keep on with your good work on this add-on, it’s required to manage hundreds of materials from PBR texture sets. Thank you!

I suspect if there is no image texture for metalness then no metalness will happen.

probably the first one alphabetically. If each was its own folder in the root they would all be imported

After massive test and importing I can tell you that in such a case (multiple resolution versions inside the same folder) the highest resolution textures set was imported (mainly 4K textures). So, it’s not the very first set (1K) to be selected. For your information.

Today I tried for the first time to batch download from cgambient, but I got this error message in the Windows CMD console:

python: can’t open file ‘ALT_CC0AssetDownloader.py’: [Errno 2] No such file or directory

The file is currently inside the add-on’s folder (see below).

… just found the source of this issue. The reason is because the \addons folder is hard coded at line 1110. Would it be possible to get the addon’s location not hard coded? The reason is because I have maintained the “old” \addons_extern folder for all non officially supported add-ons, modifying properly the \scripts\modules\addon_utils.py. I can easily modify that line but I would prefer not to do it, if possible.

I never, ever use the \scripts\addons folder for any not officially supported addons, but I do understand that many other users do not use a portable version, like I do, and they rely on Windows local user folders to add new add-ons. Sorry for the long explanation.

In case it might help: https://blender.stackexchange.com/questions/20850/how-to-automatically-get-a-add-on-folders-path-regardless-of-os

Hi all!

The “Don’t download files which already exist” function doesn’t seem to work.
It just downloads the assets and replaces the already downloaded ones.

Am I doing something wrong?