[Bf-python] Understanding blend file binary data

James Crowther jamesharrycrowther at gmail.com
Sat Jun 25 13:55:09 CEST 2016


Hi there,
             I have a need to understand why a blend file can be different
on disk after saving it despite nothing actually changing in the actual
scene data, by that I mean D.objects.

>From a cursory look at the differences using a file diff viewer like beyond
compare, I can tell that there are some metadata like the file name that
are included in the file's binary, so this would of course change for some
instances where you copy the file for example.
However, the file name is only one part of the vast number of changes I can
see.

To reproduce simply open a blend file, save it. Then copy it. Open the copy
and save it. Do a file diff on the original file and the copy and you will
see many differences throughout the file.

The use case I am working with here is I am distributing a file across many
machines to render parts on each. I need to make sure the file is the same
on each machine so I have some assurance that the file transfer works
(whatever method the transport uses, LAN, USB stick etc) and that the
machines all have the same data.
Originally I was going to do this using something like CRC32 or MD5
depending on speed and security needs, but since the file changes once it
is saved, even if the file is not changed, this presents a problem since
the data of the scene is the same, but the results of a CRC32 or MD5 will
be different due to the effects of saving a file.

Could someone educate me as to how to read the blend file format in such a
way as to remove these differences? I'm more than happy to write a custom
CRC routine so long as I can know which parts of the file contain the data
and which are headers that are altered on a save.

Thanks!

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20160625/620fb8b6/attachment.html>


More information about the Bf-python mailing list