Print at May 28, 2022, 8:13:29 AM

Posted by Puybaret at Jan 5, 2016, 6:51:39 PM
Re: Suddenly, huge file size...
I may have found a new track: exploring the data in two files showing this bug, I discovered that the error could come from a material that references a texture image of an other 3D model in a home file. A simple way to check this issue in your sh3d file is to search an occurence of ".jpg", ".bmp" or ".png" in its ContentDigests entry. In a clean file, no occurence shouldn't be found. In a buggy sh3d file, the folder entry that contains a duplicate home will appear at the line where ".jpg", ".bmp" or ".png" is found. For example, if that line contains:
Name: 117/110/texture.jpg
the buggy folder is 117.
Having such references isn't a blocking issue, since Sweet Home 3D is able to open those files. The problem comes from the saving routine that save such an image with all the home data from which it comes, instead of saving just the texture image itself. I could try to change this routine to avoid this behavior, but I would prefer to avoid such references.
Unfortunately, I didn't find any way to produce such a reference and then a buggy file yet. I tried to copy/paste objects with modified materials from a file to another one, to paste style between such objects, to export/import such objects. Every time, the saved file was correct.
Hope you can now help me to reproduce the bug more easily with this track in mind.
Emmanuel Puybaret, Sweet Home 3D developer