diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-25 01:52:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-25 01:52:18 +0400 |
commit | c61e25e6ac37296c13c0949b8363cc168125d750 (patch) | |
tree | 2bab770f7158ad937b6b7ccddea6480c8d594d90 /source/blender/blenkernel | |
parent | 3332b2b29e0b63a9768856c363dda3a4e52f4ce9 (diff) |
blend file thumbnailing
- uses same thumbnail system as image browser
- blend files show thumbnails in ubuntu/gnome (freedesktop spec)
- 128x128 images are embedded into the blend file header, a simple loader avoids reading the entire blend file to extract it when generating thumbnails in the file selector.
When the image browser reads a directory it loads images and creates thumbnails, blend files embedded images are treated just like loading an image.
- the thumbnail is created from the camera view in solid mode. (no camera == no thumbnal).
- readfile/writefile.c: had to use the 'TEST' code name to save thumbnails, anything else would segfault older blender versions on load. (its not used elsewhere).
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_utildefines.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index 73323c5a960..925b1d7171a 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -166,7 +166,7 @@ #define IMAG MAKE_ID('I','M','A','G') #define DNA1 MAKE_ID('D','N','A','1') -#define TEST MAKE_ID('T','E','S','T') +#define TEST MAKE_ID('T','E','S','T') /* used as preview between 'REND' and 'GLOB' */ #define REND MAKE_ID('R','E','N','D') #define USER MAKE_ID('U','S','E','R') diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 5d12675952c..046b8de2431 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -534,7 +534,7 @@ void BKE_write_undo(bContext *C, char *name) sprintf(numstr, "%d.blend", counter); BLI_make_file_string("/", tstr, btempdir, numstr); - success= BLO_write_file(CTX_data_main(C), tstr, G.fileflags, NULL); + success= BLO_write_file(CTX_data_main(C), tstr, G.fileflags, NULL, NULL); strcpy(curundo->str, tstr); } |