"Collect All Files" addon

Hi Blenderhead , i’m releasing my first addon, still a beta version, but everything seems to works so far on windows and linux (didn’t get a chance to test it on mac, feel free :))
Basically i wrote this pyton script cause i’m not a big fan of the packing method in blender to be sure to get all sources availbable, even on a different workstation. When i’m working on texturing, i want my textures to be separate files in order to modify them in photoshop or gimp, but i also want to be able to do the same on a different workstation, and when you have a project with a hundred of texture files, it could be a pain to keep track and organise your textures.

I come from the After Effects world, and on this software, there’s a usefull fonction called “collect all files” which basically copy all used footage, photos… of the project, and copy them to a new location, in your porject file folder. My addon do exactly the same in blender, when your project is saved (you have to do this unless you got an error) you go under the file header, under the category collect external files, and select an option (all, images, movie clip, strip, blend libraries). It worked with every kind of external datablocks, relink them and make the path absolute. It also class them in subfolder, and doesn’t create dupes. By example if a same texture is used twice in your blend from two different path, it means blender see 2 differents datablock, with the addon, it check if the files already exists before copying it, and if so, just relink the datablock !


there’s no real documentation, and i plan to add a “collect by extension” fonction and a “collect by name containing …” fonction, but these two are for comfort, the main idea is here and already usable.

Another great use could be for editing, you can collect sequencer strips file from the current scene only, avoiding on a big editing project to get a big amout of files, with some of them not used in the final edit, for example.

The addon also generates a small txt report in the collected files folder, with the name of the copied files
You can track progression of the operations on the python console, the operators freeze blender gui unfortunately (there’s some workaround about this out there, but too complicated for me…)

So here’s the link :

caf v0.1caf v0.2

Feel free to post here or on my site through the user preference addon panel in blender any critics, bugs…
And if you look at the code, be comprehensive, i’m not a programmer, so things may be not so well written in here :wink:

Hope this piece of code could be useful to people !

4 Likes

Hey :slight_smile: that’s a great idea! I really like the deduplication part. Does it also work with linked objects (are the source .blend also copied)?

Wow, I am really impressed! This is so useful. Thank you for sharing!

Yep, seems to work with linking as well.

Ho the great idea tonton,
It’s a long time i dream this feature in Blnder trunk like other applications…in print industries.
Thanks so much.
Congratulations.
Spirou4D

hi all, thanks for your interest in this and encouragement :slight_smile:
@bliblubli yep, the design of this addon is to get all relevant external files for your blend in one place, including linked libraries :slight_smile:
Is any of you guys have encounter any bug ? It seems to be error with proprietary codec (like psd), not sure why…
And is there any mac owner in the place who can tell me if the addon works smoothly ? i’ll upload a v0.2 soon (hopefully) here with some real progression state in console, not just the name of the file copying !

nice, thanks! just backed up a few files with this… fonts are missing, but those could be collected with blender pack/unpack commands… a batch mode -maybe sharing output folder to deduplicate- could be useful too

yeah you’re right, totally forgot the fonts ! i’ll see how hard it is to quickly implement that ! and i didn’t really get what you mean by batch mode, you mean same collected files folder for several blend files ? (“sharing output folder to deduplicate”)

thank you sir!, nice tool, sooo gonna try it!

The interesting tool. Thanks

Hi all blender heads ! here is a new version of the addon (0.2) with a minor bug fix,
Major changes are implementation of the font category (particular section and also in the "collect all external files"command)
And now the ressource folder created is a generic one (no blend name specified in its name) so if you stores several blend files in the same folder and use the addon on all of them, the ressource folder will be a common one, allowing you to create a kind of library folder.
Hope you’ll like it ! don’t hesitate to report some bugs here, i didn’t have time for lot of testing ! :slight_smile:

1 Like

Hey… is just looked excactly for this.
but the Dropboxlinks are down.
is this still a thing… would love to use it.

1 Like

Hi, here it is !

It could use a rewrite, but it should be working correctly !
Cheers !

4 Likes

Ah very nice.
Thanks a lot!

Hi! This looks like a great addon, thank you for sharing!

I am having some issue using it, but I think my case might be a bit extreme… I have some quite big scene files with linked assets. The linked assets also have linked material inside them. So… there’s some nested linking involved in the process.

When I try to collect all the files I get an error that says it cannot find a certain image file. If I try to collect the libraries on their own, I get no error. I am not sure what’s going on with that particular texture, but it looks like the addon stop working when he hit a problem, like a missing texture. Could that be the case? If yes it would be great if there would be a way of ignoring the missing stuff and just proceed to the end of the process.

Otherwise is there some advice you can give on how to prepare the scene a bit in order to overcome these kind of errors?

The thing is, the texture might actually be missing in some hidden shader, but when rendering the scene looks fine, so it’s not a big issue not having that particular image. I’d love to fix it anyway, but blender’s file system is not exactly helpful in finding and fixing this kind of problem, so I usually go with if it work, don’t fix it! :smiley:

Thank you for any help, and for sharing this awesome addon!

1 Like

hi bernardo, sorry for late answer !
so, about nested libraries, it should be working fine, blender will see them as usual linked libs, even if they re coming for other blend than the one originally linked (am i clear ?^^ not sure a out this long sentence :wink: )
and for thz missing image, yup for now it is a known issue, the addon is quite old, and i didn t even know about error handling at this time ! so you ll have to manually relink/delete the missing image datablock before using. i have my hand full right now, but i ll try to rewrite it properly asap ! :slight_smile:
cheers !

Hi tonton, no worries! Thank you for the answer!

Yes all the stuff, included nested libraries, worked well. As you said the missing files are the ones stopping the show! Unfortunately blender in my opinion lacks quite a lot in terms of file management. Maybe my knowledge is also lacking, in which case any advice on how to deal with this kind of problems is super welcome!

Don’t worry, I totally understand. Time is always too little! :smiley: I’ll be looking forward for news in this topic!

Best!

1 Like

blender 2.80 compatible

4 Likes

Hi, great job man ! didn’t try it yet, i’ll do it as soon as i got some free time, but great to see some interest over this addon :slight_smile:
if you want you can do a merge request i’ll incorporate it in the original repo !
cheers

@tonton @RUbben ,
Are Alembic (abc) files from mesh_sequence_cache modifier collected too?

*and MDD or PC2 files from mesh_cache mod?