Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ec18f6a6bdb..eb778048b17 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -291,11 +291,10 @@ static void ww_handle_init(eWriteWrapType ww_type, WriteWrap *r_ww)
typedef struct {
struct SDNA *sdna;
- int file;
unsigned char *buf;
MemFile *compare, *current;
- int tot, count, error, memsize;
+ int tot, count, error;
/* Wrap writing, so we can use zlib or
* other compression types later, see: G_FILE_COMPRESS
@@ -2092,7 +2091,7 @@ static void write_meshes(WriteData *wd, ListBase *idbase)
/* now fill in polys to mfaces */
/* XXX This breaks writing desing, by using temp allocated memory, which will likely generate
- * doublons in stored 'old' addresses.
+ * duplicates in stored 'old' addresses.
* This is very bad, but do not see easy way to avoid this, aside from generating those data
* outside of save process itself.
* Maybe we can live with this, though?
@@ -3704,10 +3703,11 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
* second are an RGBA image (unsigned char)
* note, this uses 'TEST' since new types will segfault on file load for older blender versions.
*/
-static void write_thumb(WriteData *wd, const int *img)
+static void write_thumb(WriteData *wd, const BlendThumbnail *thumb)
{
- if (img)
- writedata(wd, TEST, (2 + img[0] * img[1]) * sizeof(int), img);
+ if (thumb) {
+ writedata(wd, TEST, BLEN_THUMB_MEMSIZE_FILE(thumb->width, thumb->height), thumb);
+ }
}
/* if MemFile * there's filesave to memory */
@@ -3715,7 +3715,7 @@ static int write_file_handle(
Main *mainvar,
WriteWrap *ww,
MemFile *compare, MemFile *current,
- int write_user_block, int write_flags, const int *thumb)
+ int write_user_block, int write_flags, const BlendThumbnail *thumb)
{
BHead bhead;
ListBase mainlist;
@@ -3847,7 +3847,8 @@ static bool do_history(const char *name, ReportList *reports)
}
/* return: success (1) */
-int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportList *reports, const int *thumb)
+int BLO_write_file(
+ Main *mainvar, const char *filepath, int write_flags, ReportList *reports, const BlendThumbnail *thumb)
{
char tempname[FILE_MAX+1];
int err, write_user_block;