|
Blender V4.3
|
#include <cstdio>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_endian_defines.h"#include "BLI_endian_switch.h"#include "BLI_fileops.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_customdata_file.h"Go to the source code of this file.
Classes | |
| struct | CDataFileHeader |
| struct | CDataFileImageHeader |
| struct | CDataFileMeshHeader |
| struct | CDataFileLayer |
| struct | CDataFile |
Macros | |
| #define | CDF_ENDIAN_LITTLE 0 |
| #define | CDF_ENDIAN_BIG 1 |
| #define | CDF_DATA_FLOAT 0 |
| #define | CDF_VERSION 0 |
| #define | CDF_SUBVERSION 0 |
| #define | CDF_TILE_SIZE 64 |
Functions | |
| static int | cdf_endian () |
| CDataFile * | cdf_create (int type) |
| void | cdf_free (CDataFile *cdf) |
| static bool | cdf_read_header (CDataFile *cdf) |
| static bool | cdf_write_header (CDataFile *cdf) |
| bool | cdf_read_open (CDataFile *cdf, const char *filepath) |
| bool | cdf_read_layer (CDataFile *cdf, const CDataFileLayer *blay) |
| bool | cdf_read_data (CDataFile *cdf, uint size, void *data) |
| void | cdf_read_close (CDataFile *cdf) |
| bool | cdf_write_open (CDataFile *cdf, const char *filepath) |
| bool | cdf_write_layer (CDataFile *, CDataFileLayer *) |
| bool | cdf_write_data (CDataFile *cdf, uint size, const void *data) |
| void | cdf_write_close (CDataFile *cdf) |
| void | cdf_remove (const char *filepath) |
| CDataFileLayer * | cdf_layer_find (CDataFile *cdf, int type, const char *name) |
| CDataFileLayer * | cdf_layer_add (CDataFile *cdf, int type, const char *name, size_t datasize) |
| #define CDF_DATA_FLOAT 0 |
Definition at line 28 of file customdata_file.cc.
Referenced by cdf_layer_add(), and cdf_read_header().
| #define CDF_ENDIAN_BIG 1 |
Definition at line 26 of file customdata_file.cc.
Referenced by cdf_endian().
| #define CDF_ENDIAN_LITTLE 0 |
Definition at line 25 of file customdata_file.cc.
Referenced by cdf_endian().
| #define CDF_SUBVERSION 0 |
Definition at line 64 of file customdata_file.cc.
Referenced by cdf_write_open().
| #define CDF_TILE_SIZE 64 |
Definition at line 65 of file customdata_file.cc.
Referenced by cdf_write_open().
| #define CDF_VERSION 0 |
Definition at line 63 of file customdata_file.cc.
Referenced by cdf_read_header(), and cdf_write_open().
Definition at line 96 of file customdata_file.cc.
References MEM_callocN, and CDataFile::type.
Referenced by CustomData_external_read(), and CustomData_external_write().
|
static |
Definition at line 87 of file customdata_file.cc.
References CDF_ENDIAN_BIG, CDF_ENDIAN_LITTLE, ENDIAN_ORDER, and L_ENDIAN.
Referenced by cdf_read_header(), and cdf_write_open().
| void cdf_free | ( | CDataFile * | cdf | ) |
Definition at line 105 of file customdata_file.cc.
References cdf_read_close(), cdf_write_close(), CDataFile::layer, and MEM_freeN().
Referenced by CustomData_external_read(), and CustomData_external_write().
| CDataFileLayer * cdf_layer_add | ( | CDataFile * | cdf, |
| int | type, | ||
| const char * | name, | ||
| size_t | datasize ) |
Definition at line 431 of file customdata_file.cc.
References CDF_DATA_FLOAT, CDataFile::layer, MEM_calloc_arrayN, STRNCPY, CDataFileLayer::structbytes, and CDataFile::totlayer.
Referenced by CustomData_external_write().
| CDataFileLayer * cdf_layer_find | ( | CDataFile * | cdf, |
| int | type, | ||
| const char * | name ) |
Definition at line 415 of file customdata_file.cc.
References CDataFile::layer, STREQ, and CDataFile::totlayer.
Referenced by CustomData_external_read(), and CustomData_external_write().
| void cdf_read_close | ( | CDataFile * | cdf | ) |
Definition at line 331 of file customdata_file.cc.
References CDataFile::readf.
Referenced by cdf_free(), cdf_read_open(), and CustomData_external_read().
Definition at line 316 of file customdata_file.cc.
References BLI_endian_switch_float_array(), CDataFile::readf, and CDataFile::switchendian.
Referenced by layerRead_mdisps().
|
static |
Definition at line 119 of file customdata_file.cc.
References BLI_endian_switch_int32(), BLI_endian_switch_uint64(), BLI_fseek(), CDataFile::btype, CDF_DATA_FLOAT, cdf_endian(), CDF_TYPE_IMAGE, CDF_TYPE_MESH, CDF_VERSION, CDataFile::dataoffset, ELEM, CDataFileHeader::endian, CDataFile::header, CDataFileHeader::ID, CDataFile::image, image(), CDataFile::layer, MEM_calloc_arrayN, CDataFile::mesh, mesh, CDataFile::readf, CDataFileHeader::structbytes, CDataFile::switchendian, CDataFile::totlayer, CDataFileHeader::totlayer, CDataFileHeader::type, and CDataFileHeader::version.
Referenced by cdf_read_open().
| bool cdf_read_layer | ( | CDataFile * | cdf, |
| const CDataFileLayer * | blay ) |
Definition at line 298 of file customdata_file.cc.
References BLI_fseek(), CDataFile::dataoffset, CDataFileLayer::datasize, CDataFile::layer, CDataFile::readf, and CDataFile::totlayer.
Referenced by CustomData_external_read().
| bool cdf_read_open | ( | CDataFile * | cdf, |
| const char * | filepath ) |
Definition at line 274 of file customdata_file.cc.
References BLI_fopen(), cdf_read_close(), cdf_read_header(), CDataFile::header, CDataFile::readf, CDataFile::type, and CDataFileHeader::type.
Referenced by CustomData_external_read().
| void cdf_remove | ( | const char * | filepath | ) |
Definition at line 408 of file customdata_file.cc.
References BLI_delete().
| void cdf_write_close | ( | CDataFile * | cdf | ) |
Definition at line 400 of file customdata_file.cc.
References CDataFile::writef.
Referenced by cdf_free(), and CustomData_external_write().
Definition at line 390 of file customdata_file.cc.
References CDataFile::writef.
Referenced by layerWrite_mdisps().
|
static |
Definition at line 235 of file customdata_file.cc.
References CDataFile::btype, CDF_TYPE_IMAGE, CDF_TYPE_MESH, CDataFile::header, CDataFile::image, image(), CDataFile::layer, CDataFile::mesh, mesh, CDataFileHeader::totlayer, CDataFileHeader::type, and CDataFile::writef.
Referenced by cdf_write_open().
| bool cdf_write_layer | ( | CDataFile * | cdf, |
| CDataFileLayer * | blay ) |
Definition at line 385 of file customdata_file.cc.
Referenced by CustomData_external_write().
| bool cdf_write_open | ( | CDataFile * | cdf, |
| const char * | filepath ) |
Definition at line 339 of file customdata_file.cc.
References BLI_fopen(), CDataFile::btype, cdf_endian(), CDF_SUBVERSION, CDF_TILE_SIZE, CDF_TYPE_IMAGE, CDF_TYPE_MESH, CDF_VERSION, cdf_write_header(), CDataFileHeader::endian, CDataFile::header, CDataFileHeader::ID, CDataFile::image, image(), CDataFile::mesh, mesh, CDataFileHeader::structbytes, CDataFileImageHeader::structbytes, CDataFileMeshHeader::structbytes, CDataFileHeader::subversion, CDataFile::totlayer, CDataFileHeader::totlayer, CDataFile::type, CDataFileHeader::type, CDataFileHeader::version, and CDataFile::writef.
Referenced by CustomData_external_write().