34#include "dna_type_offsets.h"
42class ImplicitSharingInfo;
89#define BLO_get_struct_id(writer, struct_name) SDNA_TYPE_FROM_STRUCT(struct_name)
96#define BLO_write_struct(writer, struct_name, data_ptr) \
97 BLO_write_struct_by_id(writer, BLO_get_struct_id(writer, struct_name), data_ptr)
105 const void *data_ptr);
106#define BLO_write_struct_at_address(writer, struct_name, address, data_ptr) \
107 BLO_write_struct_at_address_by_id( \
108 writer, BLO_get_struct_id(writer, struct_name), address, data_ptr)
114 BlendWriter *writer,
int filecode,
int struct_id,
const void *address,
const void *data_ptr);
115#define BLO_write_struct_at_address_with_filecode( \
116 writer, filecode, struct_name, address, data_ptr) \
117 BLO_write_struct_at_address_by_id_with_filecode( \
118 writer, filecode, BLO_get_struct_id(writer, struct_name), address, data_ptr)
124 const char *struct_name,
126 const void *data_ptr);
130 const void *data_ptr);
131#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr) \
132 BLO_write_struct_array_by_id( \
133 writer, BLO_get_struct_id(writer, struct_name), array_size, data_ptr)
139 BlendWriter *writer,
int struct_id,
int array_size,
const void *address,
const void *data_ptr);
140#define BLO_write_struct_array_at_address(writer, struct_name, array_size, address, data_ptr) \
141 BLO_write_struct_array_at_address_by_id( \
142 writer, BLO_get_struct_id(writer, struct_name), array_size, address, data_ptr)
149#define BLO_write_struct_list(writer, struct_name, list_ptr) \
150 BLO_write_struct_list_by_id(writer, BLO_get_struct_id(writer, struct_name), list_ptr)
156#define BLO_write_id_struct(writer, struct_name, id_address, id) \
157 blo_write_id_struct(writer, BLO_get_struct_id(writer, struct_name), id_address, id)
219 size_t approximate_size_in_bytes,
262#define BLO_read_data_address(reader, ptr_p) \
263 *((void **)ptr_p) = BLO_read_get_new_data_address((reader), *(ptr_p))
275 const void *old_address,
276 size_t expected_size);
285 const void *old_address,
286 size_t expected_size);
287#define BLO_read_struct(reader, struct_name, ptr_p) \
288 *((void **)ptr_p) = BLO_read_struct_array_with_size( \
289 reader, *((void **)ptr_p), sizeof(struct_name))
290#define BLO_read_struct_array(reader, struct_name, array_size, ptr_p) \
291 *((void **)ptr_p) = BLO_read_struct_array_with_size( \
292 reader, *((void **)ptr_p), sizeof(struct_name) * (array_size))
301 const char *struct_name,
303 const void *old_address);
311 size_t expected_elem_size,
314#define BLO_read_struct_list(reader, struct_name, list) \
315 BLO_read_struct_list_with_size(reader, sizeof(struct_name), list)
353 reader, (
const void **)data_ptr, read_fn);
356 *data_ptr =
const_cast<T *
>(
static_cast<const T *
>(shared_data.
data));
388 const bool is_linked_only,
#define ATTR_PRINTF_FORMAT(format_param, dots_param)
#define ATTR_NONNULL(...)
ID * BLO_read_get_new_id_address(BlendLibReader *reader, ID *self_id, const bool is_linked_only, ID *id) ATTR_NONNULL(2)
void BLO_write_double_array(BlendWriter *writer, uint num, const double *data_ptr)
void BLO_read_float3_array(BlendDataReader *reader, int array_size, float **ptr_p)
void BLO_write_uint32_array(BlendWriter *writer, uint num, const uint32_t *data_ptr)
void BLO_write_struct_list_by_id(BlendWriter *writer, int struct_id, const ListBase *list)
void * BLO_read_struct_by_name_array(BlendDataReader *reader, const char *struct_name, uint32_t items_num, const void *old_address)
int BLO_get_struct_id_by_name(const BlendWriter *writer, const char *struct_name)
void BLO_write_float3_array(BlendWriter *writer, uint num, const float *data_ptr)
void BLO_write_struct_at_address_by_id_with_filecode(BlendWriter *writer, int filecode, int struct_id, const void *address, const void *data_ptr)
ID * BLO_read_get_new_id_address_from_session_uid(BlendLibReader *reader, uint session_uid) ATTR_NONNULL(1)
void BLO_read_uint8_array(BlendDataReader *reader, int array_size, uint8_t **ptr_p)
int BLO_read_fileversion_get(BlendDataReader *reader)
void * BLO_read_get_new_data_address_no_us(BlendDataReader *reader, const void *old_address, size_t expected_size)
BlendFileReadReport * BLO_read_data_reports(BlendDataReader *reader)
Main * BLO_read_lib_get_main(BlendLibReader *reader)
struct Library * BLO_read_data_current_library(BlendDataReader *reader)
void * BLO_read_struct_array_with_size(BlendDataReader *reader, const void *old_address, size_t expected_size)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
BLO_Write_IDBuffer * BLO_write_allocate_id_buffer()
void BLO_read_glob_list(BlendDataReader *reader, ListBase *list)
void BLO_write_int32_array(BlendWriter *writer, uint num, const int32_t *data_ptr)
void BLO_read_double_array(BlendDataReader *reader, int array_size, double **ptr_p)
bool BLO_read_data_is_undo(BlendDataReader *reader)
void blo_write_id_struct(BlendWriter *writer, int struct_id, const void *id_address, const ID *id)
void BLO_write_uint8_array(BlendWriter *writer, uint num, const uint8_t *data_ptr)
void BLO_read_float_array(BlendDataReader *reader, int array_size, float **ptr_p)
void BLO_read_int32_array(BlendDataReader *reader, int array_size, int32_t **ptr_p)
BlendFileReadReport * BLO_read_lib_reports(BlendLibReader *reader)
void BLO_read_struct_list_with_size(BlendDataReader *reader, size_t expected_elem_size, ListBase *list)
void BLO_write_init_id_buffer_from_id(BLO_Write_IDBuffer *id_buffer, ID *id, const bool is_undo)
void BLO_write_struct_array_by_id(BlendWriter *writer, int struct_id, int array_size, const void *data_ptr)
bool BLO_read_lib_is_undo(BlendLibReader *reader)
blender::ImplicitSharingInfoAndData blo_read_shared_impl(BlendDataReader *reader, const void **ptr_p, blender::FunctionRef< const blender::ImplicitSharingInfo *()> read_fn)
void BLO_read_uint32_array(BlendDataReader *reader, int array_size, uint32_t **ptr_p)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr)
void BLO_write_float_array(BlendWriter *writer, uint num, const float *data_ptr)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
void BLO_write_destroy_id_buffer(BLO_Write_IDBuffer **id_buffer)
ID * BLO_write_get_id_buffer_temp_id(BLO_Write_IDBuffer *id_buffer)
void BLO_write_int8_array(BlendWriter *writer, uint num, const int8_t *data_ptr)
void BLO_read_char_array(BlendDataReader *reader, int array_size, char **ptr_p)
void BLO_write_struct_array_by_name(BlendWriter *writer, const char *struct_name, int array_size, const void *data_ptr)
bool BLO_read_requires_endian_switch(BlendDataReader *reader)
void BLO_write_char_array(BlendWriter *writer, uint num, const char *data_ptr)
void BLO_write_raw(BlendWriter *writer, size_t size_in_bytes, const void *data_ptr)
void BLO_write_struct_at_address_by_id(BlendWriter *writer, int struct_id, const void *address, const void *data_ptr)
void * BLO_read_get_new_data_address(BlendDataReader *reader, const void *old_address)
void BLO_read_pointer_array(BlendDataReader *reader, int array_size, void **ptr_p)
void BLO_write_struct_array_at_address_by_id(BlendWriter *writer, int struct_id, int array_size, const void *address, const void *data_ptr)
bool BLO_write_is_undo(BlendWriter *writer)
void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BLO_write_shared(BlendWriter *writer, const void *data, size_t approximate_size_in_bytes, const blender::ImplicitSharingInfo *sharing_info, blender::FunctionRef< void()> write_fn)
void BLO_read_int8_array(BlendDataReader *reader, int array_size, int8_t **ptr_p)
void BLO_write_struct_by_id(BlendWriter *writer, int struct_id, const void *data_ptr)
void BLO_write_struct_list_by_name(BlendWriter *writer, const char *struct_name, ListBase *list)
const blender::ImplicitSharingInfo * BLO_read_shared(BlendDataReader *reader, T **data_ptr, blender::FunctionRef< const blender::ImplicitSharingInfo *()> read_fn)
void BLO_write_pointer_array(BlendWriter *writer, uint num, const void *data_ptr)
const ImplicitSharingInfo * sharing_info