Blender V4.5
customdata_file.cc File Reference
#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 ()
CDataFilecdf_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)
CDataFileLayercdf_layer_find (CDataFile *cdf, int type, const char *name)
CDataFileLayercdf_layer_add (CDataFile *cdf, int type, const char *name, size_t datasize)

Macro Definition Documentation

◆ CDF_DATA_FLOAT

#define CDF_DATA_FLOAT   0

Definition at line 28 of file customdata_file.cc.

Referenced by cdf_layer_add(), and cdf_read_header().

◆ CDF_ENDIAN_BIG

#define CDF_ENDIAN_BIG   1

Definition at line 26 of file customdata_file.cc.

Referenced by cdf_endian().

◆ CDF_ENDIAN_LITTLE

#define CDF_ENDIAN_LITTLE   0

Definition at line 25 of file customdata_file.cc.

Referenced by cdf_endian().

◆ CDF_SUBVERSION

#define CDF_SUBVERSION   0

Definition at line 64 of file customdata_file.cc.

Referenced by cdf_write_open().

◆ CDF_TILE_SIZE

#define CDF_TILE_SIZE   64

Definition at line 65 of file customdata_file.cc.

Referenced by cdf_write_open().

◆ CDF_VERSION

#define CDF_VERSION   0

Definition at line 63 of file customdata_file.cc.

Referenced by cdf_read_header(), and cdf_write_open().

Function Documentation

◆ cdf_create()

CDataFile * cdf_create ( int type)

◆ cdf_endian()

int cdf_endian ( )
static

◆ cdf_free()

◆ cdf_layer_add()

◆ cdf_layer_find()

CDataFileLayer * cdf_layer_find ( CDataFile * cdf,
int type,
const char * name )

◆ cdf_read_close()

void cdf_read_close ( CDataFile * cdf)

◆ cdf_read_data()

bool cdf_read_data ( CDataFile * cdf,
uint size,
void * data )

◆ cdf_read_header()

◆ cdf_read_layer()

◆ cdf_read_open()

bool cdf_read_open ( CDataFile * cdf,
const char * filepath )

◆ cdf_remove()

void cdf_remove ( const char * filepath)

Definition at line 407 of file customdata_file.cc.

References BLI_delete(), and cdf_remove().

Referenced by cdf_remove().

◆ cdf_write_close()

void cdf_write_close ( CDataFile * cdf)

Definition at line 399 of file customdata_file.cc.

References cdf_write_close(), and CDataFile::writef.

Referenced by cdf_free(), cdf_write_close(), and CustomData_external_write().

◆ cdf_write_data()

bool cdf_write_data ( CDataFile * cdf,
uint size,
const void * data )

Definition at line 389 of file customdata_file.cc.

References cdf_write_data(), data, size(), and CDataFile::writef.

Referenced by cdf_write_data(), and layerWrite_mdisps().

◆ cdf_write_header()

◆ cdf_write_layer()

bool cdf_write_layer ( CDataFile * cdf,
CDataFileLayer * blay )

Definition at line 384 of file customdata_file.cc.

References cdf_write_layer().

Referenced by cdf_write_layer(), and CustomData_external_write().

◆ cdf_write_open()