Blender
V3.3
|
#include <fstream>
#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 44 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(), err, file, O_BINARY, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 89 of file blender_thumbnailer.cc.
References extract_png_from_blend_file(), and ret.
Referenced by BKE_animsys_evaluate_all_animation(), blo_split_main(), blender::bke::curve_to_mesh_sweep(), direct_link_id(), direct_link_library(), do_version_mdef_250(), do_versions(), do_versions_after_linking(), do_versions_gpencil_2_50(), fix_relpaths_library(), blender::bke::get_curves_info(), handle_subversion_warning(), blender::ed::space_node::ntree_socket_change_type_exec(), ntreeUpdateAllNew(), ntreeUpdateAllUsers(), read_file_version(), read_libblock(), read_libblock_undo_restore(), read_libblock_undo_restore_at_old_address(), read_libblock_undo_restore_identical(), read_libblock_undo_restore_library(), read_libblock_undo_restore_linked(), RNA_main_pointer_create(), and write_libraries().