|
Blender
V2.59
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_fileops.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_customdata_file.h"#include "BKE_global.h"Go to the source code of this file.
Definition in file customdata_file.c.
| #define CDF_DATA_FLOAT 0 |
Definition at line 47 of file customdata_file.c.
Referenced by cdf_layer_add(), and cdf_read_header().
| #define CDF_ENDIAN_BIG 1 |
Definition at line 45 of file customdata_file.c.
Referenced by cdf_endian().
| #define CDF_ENDIAN_LITTLE 0 |
Definition at line 44 of file customdata_file.c.
Referenced by cdf_endian().
| #define CDF_SUBVERSION 0 |
Definition at line 83 of file customdata_file.c.
Referenced by cdf_write_open().
| #define CDF_TILE_SIZE 64 |
Definition at line 84 of file customdata_file.c.
Referenced by cdf_write_open().
| #define CDF_VERSION 0 |
Definition at line 82 of file customdata_file.c.
Referenced by cdf_read_header(), and cdf_write_open().
| typedef struct CDataFileHeader CDataFileHeader |
| typedef struct CDataFileImageHeader CDataFileImageHeader |
| typedef struct CDataFileMeshHeader CDataFileMeshHeader |
| CDataFile* cdf_create | ( | int | type | ) |
Definition at line 122 of file customdata_file.c.
References MEM_callocN(), and CDataFile::type.
Referenced by CustomData_external_read(), and CustomData_external_write().
| static int cdf_endian | ( | void | ) | [static] |
Definition at line 106 of file customdata_file.c.
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 131 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, | ||
| char * | name, | ||
| size_t | datasize | ||
| ) |
Definition at line 432 of file customdata_file.c.
References BLI_strncpy(), CDF_DATA_FLOAT, CDF_LAYER_NAME_MAX, CDataFileLayer::datasize, CDataFileLayer::datatype, CDataFile::layer, MEM_callocN(), CDataFileLayer::name, CDataFileLayer::structbytes, CDataFile::totlayer, and CDataFileLayer::type.
Referenced by CustomData_external_write().
| CDataFileLayer* cdf_layer_find | ( | CDataFile * | cdf, |
| int | type, | ||
| char * | name | ||
| ) |
Definition at line 417 of file customdata_file.c.
References CDataFile::layer, CDataFileLayer::name, NULL, CDataFile::totlayer, and CDataFileLayer::type.
Referenced by CustomData_external_read(), and CustomData_external_write().
| void cdf_read_close | ( | CDataFile * | cdf | ) |
Definition at line 338 of file customdata_file.c.
References NULL, and CDataFile::readf.
Referenced by cdf_free(), cdf_read_open(), and CustomData_external_read().
| int cdf_read_data | ( | CDataFile * | cdf, |
| unsigned int | size, | ||
| void * | data | ||
| ) |
Definition at line 318 of file customdata_file.c.
References CDataFile::readf, SWITCH_INT, and CDataFile::switchendian.
Referenced by layerRead_mdisps().
| static int cdf_read_header | ( | CDataFile * | cdf | ) | [static] |
Definition at line 144 of file customdata_file.c.
References CDataFile::btype, CDF_DATA_FLOAT, cdf_endian(), CDF_TYPE_IMAGE, CDF_TYPE_MESH, CDF_VERSION, CDataFile::dataoffset, CDataFileLayer::datasize, CDataFileLayer::datatype, ELEM, CDataFileHeader::endian, CDataFile::header, CDataFileImageHeader::height, CDataFileHeader::ID, CDataFile::image, CDataFile::layer, MEM_callocN(), CDataFile::mesh, CDataFile::readf, CDataFileHeader::structbytes, CDataFileImageHeader::structbytes, CDataFileMeshHeader::structbytes, CDataFileLayer::structbytes, SWITCH_INT, SWITCH_INT64, CDataFile::switchendian, CDataFileImageHeader::tile_size, CDataFileHeader::totlayer, CDataFile::totlayer, CDataFileHeader::type, CDataFileLayer::type, CDataFileHeader::version, and CDataFileImageHeader::width.
Referenced by cdf_read_open().
| int cdf_read_layer | ( | CDataFile * | cdf, |
| CDataFileLayer * | blay | ||
| ) |
Definition at line 301 of file customdata_file.c.
References CDataFile::dataoffset, CDataFileLayer::datasize, CDataFile::layer, CDataFile::readf, and CDataFile::totlayer.
Referenced by CustomData_external_read().
| int cdf_read_open | ( | CDataFile * | cdf, |
| char * | filename | ||
| ) |
Definition at line 278 of file customdata_file.c.
References cdf_read_close(), cdf_read_header(), CDataFile::header, CDataFile::readf, CDataFileHeader::type, and CDataFile::type.
Referenced by CustomData_external_read().
| void cdf_remove | ( | char * | filename | ) |
Definition at line 410 of file customdata_file.c.
References BLI_delete().
Referenced by CustomData_external_remove().
| void cdf_write_close | ( | CDataFile * | cdf | ) |
Definition at line 402 of file customdata_file.c.
References NULL, and CDataFile::writef.
Referenced by cdf_free(), and CustomData_external_write().
| int cdf_write_data | ( | CDataFile * | cdf, |
| unsigned int | size, | ||
| void * | data | ||
| ) |
Definition at line 393 of file customdata_file.c.
References CDataFile::writef.
Referenced by layerWrite_mdisps().
| static int cdf_write_header | ( | CDataFile * | cdf | ) | [static] |
Definition at line 243 of file customdata_file.c.
References CDataFile::btype, CDF_TYPE_IMAGE, CDF_TYPE_MESH, CDataFile::header, CDataFile::image, CDataFile::layer, CDataFile::mesh, CDataFileHeader::totlayer, CDataFileHeader::type, and CDataFile::writef.
Referenced by cdf_write_open().
| int cdf_write_layer | ( | CDataFile * | UNUSEDcdf, |
| CDataFileLayer * | UNUSEDblay | ||
| ) |
Definition at line 388 of file customdata_file.c.
| int cdf_write_open | ( | CDataFile * | cdf, |
| char * | filename | ||
| ) |
Definition at line 346 of file customdata_file.c.
References 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, CDataFile::mesh, CDataFileHeader::structbytes, CDataFileImageHeader::structbytes, CDataFileMeshHeader::structbytes, CDataFileHeader::subversion, CDataFileImageHeader::tile_size, CDataFileHeader::totlayer, CDataFile::totlayer, CDataFileHeader::type, CDataFile::type, CDataFileHeader::version, and CDataFile::writef.
Referenced by CustomData_external_write().