[Bf-committers] Materials Library for Blender

Brecht Van Lommel brechtvanlommel at pandora.be
Sun Jun 16 17:38:45 CEST 2013


In another discussion about using .blend files for this type of thing,
the big size of .blend files came up, which can be easily 400 kb even
with a single cube in it. This is because it also saves the user
interface and some other things which aren't needed here. For a
library.blend with many datablocks in it the overhead doesn't matter
as much, but if there are many files or some online material library
it could be useful.

I did a little experiment to see how small you could get a .blend file
with a single datablock in it.  By stripping all datablocks except
some specified types, stripping unused DNA data, and using gzip
compression, we can store a simple node material in 4.4 kb. Note 4 kb
is the minimum file size on many file systems.

Script strip_blend.py:
http://www.pasteall.org/43203/python

Example terminal output:
http://www.pasteall.org/43212
http://www.pasteall.org/43211


Brecht.


More information about the Bf-committers mailing list