Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | CDF_TYPE_IMAGE 0 |
#define | CDF_TYPE_MESH 1 |
#define | CDF_LAYER_NAME_MAX 64 |
Typedefs | |
typedef struct CDataFile | CDataFile |
typedef struct CDataFileLayer | CDataFileLayer |
Functions | |
CDataFile * | cdf_create (int type) |
void | cdf_free (CDataFile *cdf) |
bool | cdf_read_open (CDataFile *cdf, const char *filepath) |
bool | cdf_read_layer (CDataFile *cdf, CDataFileLayer *blay) |
bool | cdf_read_data (CDataFile *cdf, unsigned int size, void *data) |
void | cdf_read_close (CDataFile *cdf) |
bool | cdf_write_open (CDataFile *cdf, const char *filepath) |
bool | cdf_write_layer (CDataFile *cdf, CDataFileLayer *blay) |
bool | cdf_write_data (CDataFile *cdf, unsigned int size, 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_LAYER_NAME_MAX 64 |
Definition at line 16 of file BKE_customdata_file.h.
#define CDF_TYPE_IMAGE 0 |
Definition at line 13 of file BKE_customdata_file.h.
#define CDF_TYPE_MESH 1 |
Definition at line 14 of file BKE_customdata_file.h.
Definition at line 1 of file BKE_customdata_file.h.
typedef struct CDataFileLayer CDataFileLayer |
Definition at line 1 of file BKE_customdata_file.h.
CDataFile* cdf_create | ( | int | type | ) |
Definition at line 94 of file customdata_file.c.
References MEM_callocN, CDataFile::type, and type.
Referenced by CustomData_external_read(), and CustomData_external_write().
Definition at line 103 of file customdata_file.c.
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 428 of file customdata_file.c.
References BLI_strncpy(), CDF_DATA_FLOAT, CDF_LAYER_NAME_MAX, CDataFileLayer::datasize, CDataFileLayer::datatype, CDataFile::layer, MEM_calloc_arrayN, CDataFileLayer::name, CDataFileLayer::structbytes, CDataFile::totlayer, CDataFileLayer::type, and type.
Referenced by CustomData_external_write().
CDataFileLayer* cdf_layer_find | ( | CDataFile * | cdf, |
int | type, | ||
const char * | name | ||
) |
Definition at line 412 of file customdata_file.c.
References Freestyle::a, CDataFile::layer, CDataFileLayer::name, NULL, STREQ, CDataFile::totlayer, CDataFileLayer::type, and type.
Referenced by CustomData_external_read(), and CustomData_external_write().
Definition at line 328 of file customdata_file.c.
References NULL, and CDataFile::readf.
Referenced by cdf_free(), cdf_read_open(), and CustomData_external_read().
Definition at line 313 of file customdata_file.c.
References BLI_endian_switch_float_array(), data, CDataFile::readf, size(), and CDataFile::switchendian.
Referenced by layerRead_mdisps().
bool cdf_read_layer | ( | CDataFile * | cdf, |
CDataFileLayer * | blay | ||
) |
Definition at line 295 of file customdata_file.c.
References Freestyle::a, BLI_fseek(), CDataFile::dataoffset, CDataFileLayer::datasize, CDataFile::layer, offset, CDataFile::readf, and CDataFile::totlayer.
Referenced by CustomData_external_read().
Definition at line 271 of file customdata_file.c.
References BLI_fopen(), cdf_read_close(), cdf_read_header(), CDataFile::header, CDataFile::readf, CDataFileHeader::type, and CDataFile::type.
Referenced by CustomData_external_read().
void cdf_remove | ( | const char * | filepath | ) |
Definition at line 405 of file customdata_file.c.
References BLI_delete().
Definition at line 397 of file customdata_file.c.
References NULL, and CDataFile::writef.
Referenced by cdf_free(), and CustomData_external_write().
Definition at line 387 of file customdata_file.c.
References data, size(), and CDataFile::writef.
Referenced by layerWrite_mdisps().
bool cdf_write_layer | ( | CDataFile * | cdf, |
CDataFileLayer * | blay | ||
) |
Referenced by CustomData_external_write().
Definition at line 336 of file customdata_file.c.
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, CDataFileHeader::subversion, CDataFileHeader::totlayer, CDataFile::totlayer, CDataFileHeader::type, CDataFile::type, CDataFileHeader::version, and CDataFile::writef.
Referenced by CustomData_external_write().