26#define CDF_ENDIAN_LITTLE 0
27#define CDF_ENDIAN_BIG 1
29#define CDF_DATA_FLOAT 0
65#define CDF_SUBVERSION 0
66#define CDF_TILE_SIZE 64
108 MEM_delete(cdf->
layer);
122 FILE *f = cdf->
readf;
132 if (memcmp(header->
ID,
"BCDF",
sizeof(header->
ID)) != 0) {
154 if (
BLI_fseek(f, offset, SEEK_SET) != 0) {
167 offset +=
image->structbytes;
179 offset +=
mesh->structbytes;
183 if (
BLI_fseek(f, offset, SEEK_SET) != 0) {
194 for (a = 0; a < header->
totlayer; a++) {
208 offset +=
layer->structbytes;
211 if (
BLI_fseek(f, offset, SEEK_SET) != 0) {
249 for (a = 0; a < header->
totlayer; a++) {
291 for (a = 0; a < cdf->
totlayer; a++) {
292 if (&cdf->
layer[a] == blay) {
319 cdf->
readf =
nullptr;
404 for (a = 0; a < cdf->
totlayer; a++) {
424 cdf->
layer = newlayer;
432 layer->datasize = datasize;
#define CDF_LAYER_NAME_MAX
File and directory operations.
Read Blender memory allocation and freeing.
#define CDF_ENDIAN_LITTLE
void cdf_write_close(CDataFile *cdf)
unsigned __int64 uint64_t
bool cdf_read_data(CDataFile *cdf, unsigned int size, void *data)
BLI_STATIC_ASSERT(ARRAY_SIZE(data_mode_strings)==CTX_MODE_NUM+1, "Must have a string for each context mode") const char *CTX_data_mode_string(const bContext *C)
char * STRNCPY(char(&dst)[N], const char *src)
bool cdf_write_layer(CDataFile *cdf, CDataFileLayer *blay)
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_fseek(FILE *stream, int64_t offset, int whence)
static bool cdf_write_header(CDataFile *cdf)
bool cdf_write_data(CDataFile *cdf, unsigned int size, const void *data)
void cdf_free(CDataFile *cdf)
bool cdf_read_open(CDataFile *cdf, const char *filepath)
void cdf_remove(const char *filepath)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BMesh const char void * data
int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL()
bool cdf_read_layer(CDataFile *cdf, const CDataFileLayer *blay)
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)
CDataFile * cdf_create(int type)
static bool cdf_read_header(CDataFile *cdf)
bool cdf_write_open(CDataFile *cdf, const char *filepath)
void cdf_read_close(CDataFile *cdf)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
char name[CDF_LAYER_NAME_MAX]
union blender::CDataFile::@046371354302373211127230047060037177224114375037 btype
CDataFileImageHeader image