|
Blender V4.3
|
#include <fstream>#include <iostream>#include <optional>#include <fcntl.h>#include <unistd.h>#include "BLI_fileops.h"#include "BLI_filereader.h"#include "BLI_vector.hh"#include "blendthumb.hh"Go to the source code of this file.
Functions | |
| static eThumbStatus | extract_png_from_blend_file (const char *src_blend, const char *dst_png) |
| int | main (int argc, char *argv[]) |
This file defines the thumbnail generation command (typically used on UNIX).
To run automatically with a file manager such as Nautilus, save this file in a directory that is listed in PATH environment variable, and create blender.thumbnailer file in ${HOME}/.local/share/thumbnailers/ directory with the following contents:
Definition in file blender_thumbnailer.cc.
|
static |
This function opens .blend file from src_blend, extracts thumbnail from file if there is one, and writes .png image into dst_png. Returns exit code (0 if successful).
Definition at line 47 of file blender_thumbnailer.cc.
References blendthumb_create_png_data_from_thumb(), blendthumb_create_thumb_from_file(), BLI_filereader_new_file(), BLI_open(), BT_ERROR, BT_FILE_ERR, BT_OK, blender::Vector< T, InlineBufferCapacity, Allocator >::data(), O_BINARY, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by main().
Definition at line 92 of file blender_thumbnailer.cc.
References extract_png_from_blend_file(), int, and ret.