|
Blender
V2.59
|
#include <stdio.h>#include <fcntl.h>#include <sys/stat.h>#include <unistd.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_image_types.h"#include "DNA_sound_types.h"#include "DNA_vfont_types.h"#include "DNA_packedFile_types.h"#include "BLI_blenlib.h"#include "BLI_utildefines.h"#include "BKE_utildefines.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_sound.h"#include "BKE_image.h"#include "BKE_packedFile.h"#include "BKE_report.h"Go to the source code of this file.
Functions | |
| int | seekPackedFile (PackedFile *pf, int offset, int whence) |
| void | rewindPackedFile (PackedFile *pf) |
| int | readPackedFile (PackedFile *pf, void *data, int size) |
| int | countPackedFiles (Main *bmain) |
| void | freePackedFile (PackedFile *pf) |
| PackedFile * | newPackedFileMemory (void *mem, int memlen) |
| PackedFile * | newPackedFile (ReportList *reports, const char *filename) |
| void | packAll (Main *bmain, ReportList *reports) |
| int | writePackedFile (ReportList *reports, const char *filename, PackedFile *pf, int guimode) |
| int | checkPackedFile (const char *filename, PackedFile *pf) |
| char * | unpackFile (ReportList *reports, char *abs_name, char *local_name, PackedFile *pf, int how) |
| int | unpackVFont (ReportList *reports, VFont *vfont, int how) |
| int | unpackSound (Main *bmain, ReportList *reports, bSound *sound, int how) |
| int | unpackImage (ReportList *reports, Image *ima, int how) |
| void | unpackAll (Main *bmain, ReportList *reports, int how) |
Definition in file packedFile.c.
| int checkPackedFile | ( | const char * | filename, |
| PackedFile * | pf | ||
| ) |
Definition at line 340 of file packedFile.c.
References BLI_path_abs(), PackedFile::data, FILE_MAXDIR, FILE_MAXFILE, G, i, Global::main, Main::name, O_BINARY, PF_DIFFERS, PF_EQUAL, PF_NOFILE, and PackedFile::size.
Referenced by unpack_menu().
| int countPackedFiles | ( | Main * | bmain | ) |
Definition at line 129 of file packedFile.c.
References ListBase::first, VFont::id, bSound::id, Image::id, Main::image, ID::next, VFont::packedfile, bSound::packedfile, Image::packedfile, Main::sound, and Main::vfont.
Referenced by unpack_all_invoke().
| void freePackedFile | ( | PackedFile * | pf | ) |
Definition at line 152 of file packedFile.c.
References PackedFile::data, and MEM_freeN().
Referenced by BKE_image_memorypack(), BKE_image_signal(), free_image(), free_ttfont(), free_vfont(), load_vfont(), sound_free(), unpackImage(), unpackSound(), unpackVFont(), and vfont_get_data().
| PackedFile* newPackedFile | ( | ReportList * | reports, |
| const char * | filename | ||
| ) | [read] |
Definition at line 171 of file packedFile.c.
References BKE_reportf(), BLI_filesize(), BLI_path_abs(), FILE_MAXDIR, FILE_MAXFILE, G, Global::main, MEM_mallocN(), Main::name, newPackedFileMemory(), NULL, O_BINARY, pf, and RPT_ERROR.
Referenced by BKE_image_signal(), image_load_image_file(), load_vfont(), pack_exec(), packAll(), and vfont_get_data().
| PackedFile* newPackedFileMemory | ( | void * | mem, |
| int | memlen | ||
| ) | [read] |
Definition at line 162 of file packedFile.c.
References PackedFile::data, MEM_callocN(), pf, and PackedFile::size.
Referenced by get_builtin_packedfile(), and newPackedFile().
| void packAll | ( | Main * | bmain, |
| ReportList * | reports | ||
| ) |
Definition at line 218 of file packedFile.c.
References BKE_reportf(), ELEM, ListBase::first, FO_BUILTIN_NAME, VFont::id, bSound::id, Image::id, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, Main::image, ID::lib, VFont::name, bSound::name, Image::name, ID::name, newPackedFile(), ID::next, NULL, VFont::packedfile, bSound::packedfile, Image::packedfile, RPT_WARNING, Main::sound, Image::source, and Main::vfont.
Referenced by pack_all_exec(), and WM_write_file().
| int readPackedFile | ( | PackedFile * | pf, |
| void * | data, | ||
| int | size | ||
| ) |
Definition at line 108 of file packedFile.c.
References PackedFile::data, NULL, PackedFile::seek, PackedFile::size, and size().
| void rewindPackedFile | ( | PackedFile * | pf | ) |
Definition at line 103 of file packedFile.c.
References seekPackedFile().
| int seekPackedFile | ( | PackedFile * | pf, |
| int | offset, | ||
| int | whence | ||
| ) |
Definition at line 73 of file packedFile.c.
References PackedFile::seek, rna_dump::seek(), and PackedFile::size.
Referenced by rewindPackedFile().
| void unpackAll | ( | Main * | bmain, |
| ReportList * | reports, | ||
| int | how | ||
| ) |
Definition at line 529 of file packedFile.c.
References ListBase::first, VFont::id, bSound::id, Image::id, Main::image, ID::next, VFont::packedfile, bSound::packedfile, Image::packedfile, Main::sound, unpackImage(), unpackSound(), unpackVFont(), and Main::vfont.
Referenced by unpack_all_exec().
| char* unpackFile | ( | ReportList * | reports, |
| char * | abs_name, | ||
| char * | local_name, | ||
| PackedFile * | pf, | ||
| int | how | ||
| ) |
Definition at line 397 of file packedFile.c.
References BLI_exists(), MEM_mallocN(), NULL, PF_KEEP, PF_REMOVE, PF_USE_LOCAL, PF_USE_ORIGINAL, PF_WRITE_LOCAL, PF_WRITE_ORIGINAL, RET_OK, and writePackedFile().
Referenced by unpackImage(), unpackSound(), and unpackVFont().
| int unpackImage | ( | ReportList * | reports, |
| Image * | ima, | ||
| int | how | ||
| ) |
Definition at line 504 of file packedFile.c.
References BKE_image_signal(), BLI_splitdirstring(), FILE_MAX, FILE_MAXDIR, freePackedFile(), IMA_SIGNAL_RELOAD, MEM_freeN(), Image::name, NULL, Image::packedfile, RET_ERROR, RET_OK, and unpackFile().
Referenced by image_unpack_exec(), and unpackAll().
| int unpackSound | ( | Main * | bmain, |
| ReportList * | reports, | ||
| bSound * | sound, | ||
| int | how | ||
| ) |
Definition at line 476 of file packedFile.c.
References BLI_splitdirstring(), FILE_MAX, FILE_MAXDIR, freePackedFile(), MEM_freeN(), bSound::name, NULL, bSound::packedfile, RET_ERROR, RET_OK, sound_load(), and unpackFile().
Referenced by sound_unpack_exec(), and unpackAll().
| int unpackVFont | ( | ReportList * | reports, |
| VFont * | vfont, | ||
| int | how | ||
| ) |
Definition at line 451 of file packedFile.c.
References BLI_splitdirstring(), FILE_MAXDIR, FILE_MAXFILE, freePackedFile(), MEM_freeN(), VFont::name, NULL, VFont::packedfile, RET_ERROR, RET_OK, and unpackFile().
Referenced by unpackAll().
| int writePackedFile | ( | ReportList * | reports, |
| const char * | filename, | ||
| PackedFile * | pf, | ||
| int | guimode | ||
| ) |
Definition at line 272 of file packedFile.c.
References BKE_reportf(), BLI_copy_fileops(), BLI_delete(), BLI_exists(), BLI_make_existing_file(), BLI_path_abs(), BLI_rename(), PackedFile::data, FALSE, FILE_MAXDIR, FILE_MAXFILE, G, Global::main, Main::name, O_BINARY, RET_ERROR, RET_OK, RPT_ERROR, PackedFile::size, and TRUE.
Referenced by unpackFile().