96#define BLO_write_struct(writer, struct_name, data_ptr) \
97 BLO_write_struct_by_id(writer, blender::dna::sdna_struct_id_get<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, blender::dna::sdna_struct_id_get<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, blender::dna::sdna_struct_id_get<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, blender::dna::sdna_struct_id_get<struct_name>(), array_size, data_ptr)
142 const void *data_ptr);
143#define BLO_write_struct_array_at_address(writer, struct_name, array_size, address, data_ptr) \
144 BLO_write_struct_array_at_address_by_id( \
145 writer, blender::dna::sdna_struct_id_get<struct_name>(), array_size, address, data_ptr)
152#define BLO_write_struct_list(writer, struct_name, list_ptr) \
153 BLO_write_struct_list_by_id(writer, blender::dna::sdna_struct_id_get<struct_name>(), list_ptr)
159#define BLO_write_id_struct(writer, struct_name, id_address, id) \
160 blo_write_id_struct(writer, blender::dna::sdna_struct_id_get<struct_name>(), id_address, id)
172 static constexpr int static_size = 8192;
181 return static_cast<ID *
>(buffer_.buffer());
235 size_t approximate_size_in_bytes,
283#define BLO_read_data_address(reader, ptr_p) \
284 *((void **)ptr_p) = BLO_read_get_new_data_address((reader), *(ptr_p))
296 const void *old_address,
297 size_t expected_size);
306 const void *old_address,
307 size_t expected_size);
308#define BLO_read_struct(reader, struct_name, ptr_p) \
309 *((void **)ptr_p) = BLO_read_struct_array_with_size( \
310 reader, *((void **)ptr_p), sizeof(struct_name))
311#define BLO_read_struct_array(reader, struct_name, array_size, ptr_p) \
312 *((void **)ptr_p) = BLO_read_struct_array_with_size( \
313 reader, *((void **)ptr_p), sizeof(struct_name) * (array_size))
322 const char *struct_name,
324 const void *old_address);
332 size_t expected_elem_size,
335#define BLO_read_struct_list(reader, struct_name, list) \
336 BLO_read_struct_list_with_size(reader, sizeof(struct_name), list)
375 reader, (
const void **)data_ptr, read_fn);
378 *data_ptr =
const_cast<T *
>(
static_cast<const T *
>(shared_data.
data));
409 const bool is_linked_only,
#define ATTR_PRINTF_FORMAT(format_param, dots_param)
#define ATTR_NONNULL(...)
ATTR_WARN_UNUSED_RESULT const size_t num
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_struct_list_by_id(BlendWriter *writer, int struct_id, const ListBase *list)
int BLO_get_struct_id_by_name(const BlendWriter *writer, const char *struct_name)
void BLO_write_float_array(BlendWriter *writer, int64_t num, const float *data_ptr)
void BLO_read_uint8_array(BlendDataReader *reader, int64_t array_size, uint8_t **ptr_p)
void BLO_write_struct_at_address_by_id_with_filecode(BlendWriter *writer, int filecode, int struct_id, const void *address, const void *data_ptr)
void BLO_read_float3_array(BlendDataReader *reader, int64_t array_size, float **ptr_p)
ID * BLO_read_get_new_id_address_from_session_uid(BlendLibReader *reader, uint session_uid) ATTR_NONNULL(1)
void BLO_write_int32_array(BlendWriter *writer, int64_t num, const int32_t *data_ptr)
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)
void BLO_read_uint32_array(BlendDataReader *reader, int64_t array_size, uint32_t **ptr_p)
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)
void BLO_read_glob_list(BlendDataReader *reader, ListBase *list)
void BLO_write_struct_array_by_name(BlendWriter *writer, const char *struct_name, int64_t array_size, const void *data_ptr)
void BLO_read_float_array(BlendDataReader *reader, int64_t array_size, float **ptr_p)
void BLO_write_struct_array_by_id(BlendWriter *writer, int struct_id, int64_t array_size, const void *data_ptr)
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_read_int32_array(BlendDataReader *reader, int64_t array_size, int32_t **ptr_p)
void BLO_write_uint8_array(BlendWriter *writer, int64_t num, const uint8_t *data_ptr)
void * BLO_read_struct_by_name_array(BlendDataReader *reader, const char *struct_name, int64_t items_num, const void *old_address)
BlendFileReadReport * BLO_read_lib_reports(BlendLibReader *reader)
void BLO_write_float3_array(BlendWriter *writer, int64_t num, const float *data_ptr)
void BLO_read_int16_array(BlendDataReader *reader, const int64_t array_size, int16_t **ptr_p)
void BLO_read_struct_list_with_size(BlendDataReader *reader, size_t expected_elem_size, ListBase *list)
void BLO_write_int8_array(BlendWriter *writer, int64_t num, const int8_t *data_ptr)
bool BLO_read_lib_is_undo(BlendLibReader *reader)
void BLO_read_double_array(BlendDataReader *reader, int64_t array_size, double **ptr_p)
blender::ImplicitSharingInfoAndData blo_read_shared_impl(BlendDataReader *reader, const void **ptr_p, blender::FunctionRef< const blender::ImplicitSharingInfo *()> read_fn)
void BLO_write_double_array(BlendWriter *writer, int64_t num, const double *data_ptr)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
void BLO_read_int8_array(BlendDataReader *reader, int64_t array_size, int8_t **ptr_p)
void BLO_write_shared_tag(BlendWriter *writer, const void *data)
void BLO_write_uint32_array(BlendWriter *writer, int64_t num, const uint32_t *data_ptr)
void BLO_read_char_array(BlendDataReader *reader, int64_t array_size, char **ptr_p)
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_write_pointer_array(BlendWriter *writer, int64_t num, const void *data_ptr)
void BLO_read_pointer_array(BlendDataReader *reader, int64_t array_size, void **ptr_p)
bool BLO_write_is_undo(BlendWriter *writer)
void BLO_write_int16_array(BlendWriter *writer, int64_t num, const int16_t *data_ptr)
void BLO_write_char_array(BlendWriter *writer, int64_t num, const char *data_ptr)
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_write_struct_array_at_address_by_id(BlendWriter *writer, int struct_id, int64_t array_size, const void *address, const void *data_ptr)
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)
BMesh const char void * data
BLO_Write_IDBuffer(ID &id, bool is_undo, bool is_placeholder)
const ImplicitSharingInfo * sharing_info