<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi James,</p>
<p>Think the main (if not the only) serious cause of those
differences here are the fact that Blender uses memory addresses
of its struct as 'in-file uuid' in the .blend. So first thing to
do for your usecase would be to ignore all and every pointers from
DNA structs, since those will change every time.</p>
<p>As for reading a .blend file, besides blender code itself,
suggest you have a look at code in io_blend_utils folder in addons
repository, not yet complete but should give you a good start. You
may also want to have a look to blend2json.py script (in our
blender-dev-tools git repository,
<a class="moz-txt-link-freetext" href="https://developer.blender.org/diffusion/BDT/">https://developer.blender.org/diffusion/BDT/</a>).</p>
<p>Cheers,<br>
Bastien<br>
</p>
<div class="moz-cite-prefix">Le 25/06/2016 à 13:55, James Crowther a
écrit :<br>
</div>
<blockquote
cite="mid:CAJOwpNsZo1zmhMkx_knOkbYwtKe6zone4OTQT8+Jbt1vRdfgog@mail.gmail.com"
type="cite">
<div dir="ltr">Hi there,
<div> 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.</div>
<div><br>
</div>
<div>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. </div>
<div>However, the file name is only one part of the vast number
of changes I can see. </div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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. </div>
<div>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. </div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>James</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Bf-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bf-python@blender.org">Bf-python@blender.org</a>
<a class="moz-txt-link-freetext" href="https://lists.blender.org/mailman/listinfo/bf-python">https://lists.blender.org/mailman/listinfo/bf-python</a>
</pre>
</blockquote>
<br>
</body>
</html>