Blender
V3.3
|
Go to the source code of this file.
Typedefs | |
typedef struct BlendDataReader | BlendDataReader |
typedef struct BlendExpander | BlendExpander |
typedef struct BlendLibReader | BlendLibReader |
typedef struct BlendWriter | BlendWriter |
Functions | |
Report API | |
void | BLO_reportf_wrap (struct BlendFileReadReport *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3 |
Blend Write API | |
Most functions fall into one of two categories. Either they write a DNA struct or a raw memory buffer to the .blend file. It is safe to pass NULL as data_ptr. In this case nothing will be stored. DNA Struct WritingFunctions dealing with DNA structs begin with DNA struct types can be identified in different ways:
Often only a single instance of a struct is written at once. However, sometimes it is necessary to write arrays or linked lists. Separate functions for that are provided as well. There is a special macro for writing id structs: BLO_write_id_struct. Those are handled differently from other structs. Raw Data WritingAt the core there is BLO_write_raw, which can write arbitrary memory buffers to the file. The code that reads this data might have to correct its byte-order. For the common cases there are convenience functions that write and read arrays of simple types such as | |
#define | BLO_get_struct_id(writer, struct_name) SDNA_TYPE_FROM_STRUCT(struct_name) |
#define | BLO_write_struct(writer, struct_name, data_ptr) BLO_write_struct_by_id(writer, BLO_get_struct_id(writer, struct_name), data_ptr) |
#define | BLO_write_struct_at_address(writer, struct_name, address, data_ptr) |
#define | BLO_write_struct_at_address_with_filecode(writer, filecode, struct_name, address, data_ptr) |
#define | BLO_write_struct_array(writer, struct_name, array_size, data_ptr) |
#define | BLO_write_struct_array_at_address(writer, struct_name, array_size, address, data_ptr) |
#define | BLO_write_struct_list(writer, struct_name, list_ptr) BLO_write_struct_list_by_id(writer, BLO_get_struct_id(writer, struct_name), list_ptr) |
#define | BLO_write_id_struct(writer, struct_name, id_address, id) blo_write_id_struct(writer, BLO_get_struct_id(writer, struct_name), id_address, id) |
int | BLO_get_struct_id_by_name (BlendWriter *writer, const char *struct_name) |
void | BLO_write_struct_by_name (BlendWriter *writer, const char *struct_name, const void *data_ptr) |
void | BLO_write_struct_by_id (BlendWriter *writer, int struct_id, 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_write_struct_at_address_by_id_with_filecode (BlendWriter *writer, int filecode, int struct_id, const void *address, const void *data_ptr) |
void | BLO_write_struct_array_by_name (BlendWriter *writer, const char *struct_name, int array_size, const void *data_ptr) |
void | BLO_write_struct_array_by_id (BlendWriter *writer, int struct_id, int array_size, const void *data_ptr) |
void | BLO_write_struct_array_at_address_by_id (BlendWriter *writer, int struct_id, int array_size, const void *address, const void *data_ptr) |
void | BLO_write_struct_list_by_name (BlendWriter *writer, const char *struct_name, struct ListBase *list) |
void | BLO_write_struct_list_by_id (BlendWriter *writer, int struct_id, struct ListBase *list) |
void | blo_write_id_struct (BlendWriter *writer, int struct_id, const void *id_address, const struct ID *id) |
void | BLO_write_raw (BlendWriter *writer, size_t size_in_bytes, const void *data_ptr) |
void | BLO_write_int32_array (BlendWriter *writer, uint num, const int32_t *data_ptr) |
void | BLO_write_uint32_array (BlendWriter *writer, uint num, const uint32_t *data_ptr) |
void | BLO_write_float_array (BlendWriter *writer, uint num, const float *data_ptr) |
void | BLO_write_double_array (BlendWriter *writer, uint num, const double *data_ptr) |
void | BLO_write_float3_array (BlendWriter *writer, uint num, const float *data_ptr) |
void | BLO_write_pointer_array (BlendWriter *writer, uint num, const void *data_ptr) |
void | BLO_write_string (BlendWriter *writer, const char *data_ptr) |
bool | BLO_write_is_undo (BlendWriter *writer) |
Blend Read Data API | |
Generally, for every BLO_write_* call there should be a corresponding BLO_read_* call. Most BLO_read_* functions get a pointer to a pointer as argument. That allows the function to update the pointer to its new value. When the given pointer points to a memory buffer that was not stored in the file, the pointer is updated to be NULL. When it was pointing to NULL before, it will stay that way. Examples of matching calls: BLO_write_struct(writer, ClothSimSettings, clmd->sim_parms);
BLO_read_data_address(reader, &clmd->sim_parms);
BLO_write_struct_list(writer, TimeMarker, &action->markers);
BLO_read_list(reader, &action->markers);
BLO_write_int32_array(writer, hmd->totindex, hmd->indexar);
BLO_read_int32_array(reader, hmd->totindex, &hmd->indexar);
void BLO_write_int32_array(BlendWriter *writer, uint num, const int32_t *data_ptr) Definition: writefile.c:1571 void BLO_read_int32_array(BlendDataReader *reader, int array_size, int32_t **ptr_p) Definition: readfile.c:5177 #define BLO_write_struct(writer, struct_name, data_ptr) Definition: BLO_read_write.h:93 void BLO_read_list(BlendDataReader *reader, struct ListBase *list) Definition: readfile.c:5172 #define BLO_write_struct_list(writer, struct_name, list_ptr) Definition: BLO_read_write.h:148 Definition: DNA_cloth_types.h:28 Definition: DNA_scene_types.h:841 | |
#define | BLO_read_data_address(reader, ptr_p) *((void **)ptr_p) = BLO_read_get_new_data_address((reader), *(ptr_p)) |
#define | BLO_read_packed_address(reader, ptr_p) *((void **)ptr_p) = BLO_read_get_new_packed_address((reader), *(ptr_p)) |
typedef void(* | BlendReadListFn) (BlendDataReader *reader, void *data) |
void * | BLO_read_get_new_data_address (BlendDataReader *reader, const void *old_address) |
void * | BLO_read_get_new_data_address_no_us (BlendDataReader *reader, const void *old_address) |
void * | BLO_read_get_new_packed_address (BlendDataReader *reader, const void *old_address) |
void | BLO_read_list_cb (BlendDataReader *reader, struct ListBase *list, BlendReadListFn callback) |
void | BLO_read_list (BlendDataReader *reader, struct ListBase *list) |
void | BLO_read_int32_array (BlendDataReader *reader, int array_size, int32_t **ptr_p) |
void | BLO_read_uint32_array (BlendDataReader *reader, int array_size, uint32_t **ptr_p) |
void | BLO_read_float_array (BlendDataReader *reader, int array_size, float **ptr_p) |
void | BLO_read_float3_array (BlendDataReader *reader, int array_size, float **ptr_p) |
void | BLO_read_double_array (BlendDataReader *reader, int array_size, double **ptr_p) |
void | BLO_read_pointer_array (BlendDataReader *reader, void **ptr_p) |
bool | BLO_read_requires_endian_switch (BlendDataReader *reader) |
bool | BLO_read_data_is_undo (BlendDataReader *reader) |
void | BLO_read_data_globmap_add (BlendDataReader *reader, void *oldaddr, void *newaddr) |
void | BLO_read_glob_list (BlendDataReader *reader, struct ListBase *list) |
struct BlendFileReadReport * | BLO_read_data_reports (BlendDataReader *reader) |
Blend Read Lib API | |
This API does almost the same as the Blend Read Data API. However, now only pointers to ID data blocks are updated. | |
#define | BLO_read_id_address(reader, lib, id_ptr_p) *((void **)id_ptr_p) = (void *)BLO_read_get_new_id_address((reader), (lib), (ID *)*(id_ptr_p)) |
ID * | BLO_read_get_new_id_address (BlendLibReader *reader, struct Library *lib, struct ID *id) |
bool | BLO_read_lib_is_undo (BlendLibReader *reader) |
struct Main * | BLO_read_lib_get_main (BlendLibReader *reader) |
struct BlendFileReadReport * | BLO_read_lib_reports (BlendLibReader *reader) |
Blend Expand API | |
BLO_expand has to be called for every data block that should be loaded. If the data block is in a separate | |
#define | BLO_expand(expander, id) BLO_expand_id(expander, (struct ID *)id) |
void | BLO_expand_id (BlendExpander *expander, struct ID *id) |
This file contains an API that allows different parts of Blender to define what data is stored in .blend files.
Four callbacks have to be provided to fully implement .blend I/O for a piece of data. One of those is related to file writing and three for file reading. Reading requires multiple callbacks, due to the way linking between files works.
Brief description of the individual callbacks:
Each of these callbacks uses a different API functions.
Some parts of Blender, e.g. modifiers, don't require you to implement all four callbacks. Instead only the first two are necessary. The other two are handled by general ID management. In the future, we might want to get rid of those two callbacks entirely, but for now they are necessary.
Definition in file BLO_read_write.h.
#define BLO_expand | ( | expander, | |
id | |||
) | BLO_expand_id(expander, (struct ID *)id) |
Definition at line 277 of file BLO_read_write.h.
#define BLO_get_struct_id | ( | writer, | |
struct_name | |||
) | SDNA_TYPE_FROM_STRUCT(struct_name) |
Definition at line 86 of file BLO_read_write.h.
#define BLO_read_data_address | ( | reader, | |
ptr_p | |||
) | *((void **)ptr_p) = BLO_read_get_new_data_address((reader), *(ptr_p)) |
Definition at line 215 of file BLO_read_write.h.
#define BLO_read_id_address | ( | reader, | |
lib, | |||
id_ptr_p | |||
) | *((void **)id_ptr_p) = (void *)BLO_read_get_new_id_address((reader), (lib), (ID *)*(id_ptr_p)) |
Definition at line 257 of file BLO_read_write.h.
#define BLO_read_packed_address | ( | reader, | |
ptr_p | |||
) | *((void **)ptr_p) = BLO_read_get_new_packed_address((reader), *(ptr_p)) |
Definition at line 217 of file BLO_read_write.h.
#define BLO_write_id_struct | ( | writer, | |
struct_name, | |||
id_address, | |||
id | |||
) | blo_write_id_struct(writer, BLO_get_struct_id(writer, struct_name), id_address, id) |
Definition at line 158 of file BLO_read_write.h.
#define BLO_write_struct | ( | writer, | |
struct_name, | |||
data_ptr | |||
) | BLO_write_struct_by_id(writer, BLO_get_struct_id(writer, struct_name), data_ptr) |
Definition at line 93 of file BLO_read_write.h.
#define BLO_write_struct_array | ( | writer, | |
struct_name, | |||
array_size, | |||
data_ptr | |||
) |
Definition at line 128 of file BLO_read_write.h.
#define BLO_write_struct_array_at_address | ( | writer, | |
struct_name, | |||
array_size, | |||
address, | |||
data_ptr | |||
) |
Definition at line 137 of file BLO_read_write.h.
#define BLO_write_struct_at_address | ( | writer, | |
struct_name, | |||
address, | |||
data_ptr | |||
) |
Definition at line 103 of file BLO_read_write.h.
#define BLO_write_struct_at_address_with_filecode | ( | writer, | |
filecode, | |||
struct_name, | |||
address, | |||
data_ptr | |||
) |
Definition at line 112 of file BLO_read_write.h.
#define BLO_write_struct_list | ( | writer, | |
struct_name, | |||
list_ptr | |||
) | BLO_write_struct_list_by_id(writer, BLO_get_struct_id(writer, struct_name), list_ptr) |
Definition at line 148 of file BLO_read_write.h.
typedef struct BlendDataReader BlendDataReader |
Definition at line 1 of file BLO_read_write.h.
typedef struct BlendExpander BlendExpander |
Definition at line 1 of file BLO_read_write.h.
typedef struct BlendLibReader BlendLibReader |
Definition at line 1 of file BLO_read_write.h.
typedef void(* BlendReadListFn) (BlendDataReader *reader, void *data) |
Definition at line 220 of file BLO_read_write.h.
typedef struct BlendWriter BlendWriter |
Definition at line 1 of file BLO_read_write.h.
void BLO_expand_id | ( | BlendExpander * | expander, |
struct ID * | id | ||
) |
Definition at line 5323 of file readfile.c.
References expand_doit, BlendExpander::fd, and BlendExpander::main.
int BLO_get_struct_id_by_name | ( | BlendWriter * | writer, |
const char * | struct_name | ||
) |
Mapping between names and ids.
Definition at line 1565 of file writefile.c.
References DNA_struct_find_nr(), WriteData::sdna, and BlendWriter::wd.
Referenced by BLO_write_struct_array_by_name(), and BLO_write_struct_list_by_name().
void BLO_read_data_globmap_add | ( | BlendDataReader * | reader, |
void * | oldaddr, | ||
void * | newaddr | ||
) |
Definition at line 5293 of file readfile.c.
References BlendDataReader::fd, FileData::globmap, and oldnewmap_insert().
Referenced by window_manager_blend_read_data().
bool BLO_read_data_is_undo | ( | BlendDataReader * | reader | ) |
Definition at line 5288 of file readfile.c.
References BlendDataReader::fd, FD_FLAGS_IS_MEMFILE, and FileData::flags.
Referenced by BKE_previewimg_blend_read(), direct_link_id_common(), image_blend_read_data(), object_blend_read_data(), scene_blend_read_data(), and sound_blend_read_data().
struct BlendFileReadReport* BLO_read_data_reports | ( | BlendDataReader * | reader | ) |
Definition at line 5303 of file readfile.c.
References BlendDataReader::fd, and FileData::reports.
Referenced by BKE_modifier_blend_read_data(), and link_recurs_seq().
void BLO_read_double_array | ( | BlendDataReader * | reader, |
int | array_size, | ||
double ** | ptr_p | ||
) |
Definition at line 5206 of file readfile.c.
References BLI_endian_switch_double_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by IDP_DirectLinkArray(), and read_ui_data().
void BLO_read_float3_array | ( | BlendDataReader * | reader, |
int | array_size, | ||
float ** | ptr_p | ||
) |
Definition at line 5201 of file readfile.c.
References BLO_read_float_array().
Referenced by blendRead().
void BLO_read_float_array | ( | BlendDataReader * | reader, |
int | array_size, | ||
float ** | ptr_p | ||
) |
Definition at line 5193 of file readfile.c.
References BLI_endian_switch_float_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by BKE_fmodifiers_blend_read_data(), blendRead(), and BLO_read_float3_array().
void* BLO_read_get_new_data_address | ( | BlendDataReader * | reader, |
const void * | old_address | ||
) |
Definition at line 5123 of file readfile.c.
References BlendDataReader::fd, and newdataadr().
Referenced by BKE_defvert_blend_read(), BKE_modifier_blend_read_data(), modifier_replace_with_fluid(), and scene_blend_read_data().
void* BLO_read_get_new_data_address_no_us | ( | BlendDataReader * | reader, |
const void * | old_address | ||
) |
Definition at line 5128 of file readfile.c.
References BlendDataReader::fd, and newdataadr_no_us().
Referenced by direct_link_area().
ID* BLO_read_get_new_id_address | ( | BlendLibReader * | reader, |
struct Library * | lib, | ||
struct ID * | id | ||
) |
Definition at line 5138 of file readfile.c.
References BlendLibReader::fd, lib, and newlibadr().
Referenced by brush_undo_preserve_cb(), IDP_BlendReadLib(), object_blend_read_lib(), and scene_foreach_toolsettings_id_pointer_process().
void* BLO_read_get_new_packed_address | ( | BlendDataReader * | reader, |
const void * | old_address | ||
) |
Definition at line 5133 of file readfile.c.
References BlendDataReader::fd, and newpackedadr().
void BLO_read_glob_list | ( | BlendDataReader * | reader, |
struct ListBase * | list | ||
) |
Definition at line 5298 of file readfile.c.
References BlendDataReader::fd, and link_glob_list().
Referenced by scene_blend_read_data().
void BLO_read_int32_array | ( | BlendDataReader * | reader, |
int | array_size, | ||
int32_t ** | ptr_p | ||
) |
Definition at line 5177 of file readfile.c.
References BLI_endian_switch_int32_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by blendRead(), curves_blend_read_data(), IDP_DirectLinkArray(), object_blend_read_data(), and read_ui_data().
struct Main* BLO_read_lib_get_main | ( | BlendLibReader * | reader | ) |
Definition at line 5313 of file readfile.c.
References BlendLibReader::main.
Referenced by BKE_pose_blend_read_lib(), object_blend_read_lib(), and workspace_blend_read_lib().
bool BLO_read_lib_is_undo | ( | BlendLibReader * | reader | ) |
Definition at line 5308 of file readfile.c.
References BlendLibReader::fd, FD_FLAGS_IS_MEMFILE, and FileData::flags.
Referenced by BKE_pose_blend_read_lib(), and ntreeBlendReadLib().
struct BlendFileReadReport* BLO_read_lib_reports | ( | BlendLibReader * | reader | ) |
Definition at line 5318 of file readfile.c.
References BlendLibReader::fd, and FileData::reports.
Referenced by object_blend_read_lib(), and scene_blend_read_lib().
void BLO_read_list | ( | BlendDataReader * | reader, |
struct ListBase * | list | ||
) |
Definition at line 5172 of file readfile.c.
References BLO_read_list_cb(), and NULL.
Referenced by action_blend_read_data(), armature_blend_read_data(), BKE_animdata_blend_read_data(), BKE_asset_metadata_read(), BKE_collection_blend_read_data(), BKE_constraint_blend_read_data(), BKE_fcurve_blend_read_data(), BKE_gpencil_blend_read_data(), BKE_gpencil_modifier_blend_read_data(), BKE_keyingsets_blend_read_data(), BKE_modifier_blend_read_data(), BKE_nla_blend_read_data(), BKE_particle_system_blend_read_data(), BKE_pose_blend_read_data(), BKE_ptcache_blend_read_data(), BKE_screen_area_map_blend_read_data(), BKE_shaderfx_blend_read_data(), BKE_view_layer_blend_read_data(), blend_data_read_nla_strips(), cache_file_blend_read_data(), camera_blend_read_data(), curve_blend_read_data(), direct_link_area(), direct_link_bones(), direct_link_layer_collections(), direct_link_moviePlaneTracks(), direct_link_movieTracks(), direct_link_nlastrips(), direct_link_panel_list(), direct_link_pointcache_cb(), direct_link_region(), IDP_DirectLinkGroup(), image_blend_read_data(), ipo_blend_read_data(), lattice_blend_read_data(), linestyle_blend_read_data(), link_recurs_seq(), mask_blend_read_data(), mesh_blend_read_data(), metaball_blend_read_data(), movieclip_blend_read_data(), ntreeBlendReadData(), object_blend_read_data(), palette_blend_read_data(), particle_settings_blend_read_data(), read_userdef(), scene_blend_read_data(), SEQ_modifier_blend_read_data(), seq_read_data_cb(), shapekey_blend_read_data(), text_blend_read_data(), window_manager_blend_read_data(), and workspace_blend_read_data().
void BLO_read_list_cb | ( | BlendDataReader * | reader, |
struct ListBase * | list, | ||
BlendReadListFn | callback | ||
) |
Updates all ->prev and ->next pointers of the list elements. Updates the list->first and list->last pointers. When not NULL, calls the callback on every element.
Definition at line 5148 of file readfile.c.
References BLI_listbase_is_empty(), BLO_read_data_address, callback, ListBase::first, ListBase::last, Link::next, NULL, blender::meshintersect::prev(), and Link::prev.
Referenced by BLO_read_list(), direct_link_id_common(), direct_link_id_override_property_cb(), and direct_link_pointcache().
void BLO_read_pointer_array | ( | BlendDataReader * | reader, |
void ** | ptr_p | ||
) |
Definition at line 5245 of file readfile.c.
References BLI_assert, convert_pointer_array_32_to_64(), convert_pointer_array_64_to_32(), BlendDataReader::fd, FileData::filesdna, MEM_allocN_len, MEM_freeN, MEM_malloc_arrayN, FileData::memsdna, newdataadr(), NULL, and SDNA::pointer_size.
Referenced by BKE_gpencil_blend_read_data(), curve_blend_read_data(), curves_blend_read_data(), direct_link_moviePlaneTracks(), IDP_DirectLinkArray(), mesh_blend_read_data(), metaball_blend_read_data(), object_blend_read_data(), pointcloud_blend_read_data(), and volume_blend_read_data().
bool BLO_read_requires_endian_switch | ( | BlendDataReader * | reader | ) |
Definition at line 5143 of file readfile.c.
References BlendDataReader::fd, FD_FLAGS_SWITCH_ENDIAN, and FileData::flags.
Referenced by blend_read_mdisps(), BLO_read_double_array(), BLO_read_float_array(), BLO_read_int32_array(), BLO_read_uint32_array(), convert_pointer_array_64_to_32(), curve_blend_read_data(), direct_link_lightcache_texture(), direct_link_pointcache_cb(), IDP_DirectLinkProperty(), ipo_blend_read_data(), mask_blend_read_data(), mesh_blend_read_data(), and shapekey_blend_read_data().
void BLO_read_uint32_array | ( | BlendDataReader * | reader, |
int | array_size, | ||
uint32_t ** | ptr_p | ||
) |
Definition at line 5185 of file readfile.c.
References BLI_endian_switch_uint32_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by blendRead().
void BLO_reportf_wrap | ( | struct BlendFileReadReport * | reports, |
eReportType | type, | ||
const char * | format, | ||
... | |||
) |
This function ensures that reports are printed, in the case of library linking errors this is important!
NOTE(@campbellbarton) a kludge but better than doubling up on prints, we could alternatively have a versions of a report function which forces printing.
Referenced by BKE_modifier_blend_read_data(), object_blend_read_lib(), and scene_blend_read_lib().
void BLO_write_double_array | ( | BlendWriter * | writer, |
uint | num, | ||
const double * | data_ptr | ||
) |
Definition at line 1586 of file writefile.c.
References BLO_write_raw().
Referenced by write_ui_data().
void BLO_write_float3_array | ( | BlendWriter * | writer, |
uint | num, | ||
const float * | data_ptr | ||
) |
Definition at line 1596 of file writefile.c.
References BLO_write_raw().
Referenced by blendWrite(), and write_mdisps().
void BLO_write_float_array | ( | BlendWriter * | writer, |
uint | num, | ||
const float * | data_ptr | ||
) |
Definition at line 1581 of file writefile.c.
References BLO_write_raw().
Referenced by BKE_constraint_blend_write(), BKE_fmodifiers_blend_write(), blendWrite(), curve_blend_write(), and mask_blend_write().
void blo_write_id_struct | ( | BlendWriter * | writer, |
int | struct_id, | ||
const void * | id_address, | ||
const struct ID * | id | ||
) |
Write id struct.
void BLO_write_int32_array | ( | BlendWriter * | writer, |
uint | num, | ||
const int32_t * | data_ptr | ||
) |
Definition at line 1571 of file writefile.c.
References BLO_write_raw().
Referenced by blendWrite(), curves_blend_write(), and write_ui_data().
bool BLO_write_is_undo | ( | BlendWriter * | writer | ) |
Sometimes different data is written depending on whether the file is saved to disk or used for undo. This function returns true when the current file-writing is done for undo.
Definition at line 1608 of file writefile.c.
References WriteData::use_memfile, and BlendWriter::wd.
Referenced by blendWrite(), CustomData_blend_write(), image_blend_write(), mesh_blend_write(), ntreeBlendWrite(), object_blend_write(), scene_blend_write(), shapekey_blend_write(), sound_blend_write(), vfont_blend_write(), and volume_blend_write().
void BLO_write_pointer_array | ( | BlendWriter * | writer, |
uint | num, | ||
const void * | data_ptr | ||
) |
Definition at line 1591 of file writefile.c.
References BLO_write_raw().
Referenced by curve_blend_write(), curves_blend_write(), greasepencil_blend_write(), mesh_blend_write(), metaball_blend_write(), object_blend_write(), pointcloud_blend_write(), volume_blend_write(), and write_moviePlaneTracks().
void BLO_write_raw | ( | BlendWriter * | writer, |
size_t | size_in_bytes, | ||
const void * | data_ptr | ||
) |
Write raw data.
Definition at line 1489 of file writefile.c.
References DATA, BlendWriter::wd, and writedata().
Referenced by BKE_packedfile_blend_write(), BKE_ptcache_blend_write(), BLO_write_double_array(), BLO_write_float3_array(), BLO_write_float_array(), BLO_write_int32_array(), BLO_write_pointer_array(), BLO_write_string(), BLO_write_uint32_array(), curve_blend_write(), CustomData_blend_write(), IDP_WriteArray(), IDP_WriteString(), mesh_blend_write(), object_blend_write(), scene_blend_write(), shapekey_blend_write(), text_blend_write(), write_area(), write_grid_paint_mask(), write_lightcache_texture(), and write_mdisps().
void BLO_write_string | ( | BlendWriter * | writer, |
const char * | data_ptr | ||
) |
Write a null terminated string.
Definition at line 1601 of file writefile.c.
References BLO_write_raw(), and NULL.
Referenced by BKE_animdata_blend_write(), BKE_asset_metadata_write(), BKE_fcurve_blend_write(), BKE_id_blend_write(), BKE_keyingsets_blend_write(), curves_blend_write(), ntreeBlendWrite(), text_blend_write(), write_area(), write_node_socket_interface(), and write_ui_data().
void BLO_write_struct_array_at_address_by_id | ( | BlendWriter * | writer, |
int | struct_id, | ||
int | array_size, | ||
const void * | address, | ||
const void * | data_ptr | ||
) |
Write struct array at address.
Definition at line 1539 of file writefile.c.
References DATA, BlendWriter::wd, and writestruct_at_address_nr().
void BLO_write_struct_array_by_id | ( | BlendWriter * | writer, |
int | struct_id, | ||
int | array_size, | ||
const void * | data_ptr | ||
) |
Definition at line 1531 of file writefile.c.
References DATA, BlendWriter::wd, and writestruct_nr().
Referenced by BLO_write_struct_array_by_name().
void BLO_write_struct_array_by_name | ( | BlendWriter * | writer, |
const char * | struct_name, | ||
int | array_size, | ||
const void * | data_ptr | ||
) |
Write struct array.
Definition at line 1499 of file writefile.c.
References BLO_get_struct_id_by_name(), BLO_write_struct_array_by_id(), CLOG_ERROR, LOG, and UNLIKELY.
Referenced by BKE_ptcache_blend_write(), BLO_write_struct_by_name(), and CustomData_blend_write().
void BLO_write_struct_at_address_by_id | ( | BlendWriter * | writer, |
int | struct_id, | ||
const void * | address, | ||
const void * | data_ptr | ||
) |
Write single struct at address.
Definition at line 1517 of file writefile.c.
References BLO_write_struct_at_address_by_id_with_filecode(), and DATA.
void BLO_write_struct_at_address_by_id_with_filecode | ( | BlendWriter * | writer, |
int | filecode, | ||
int | struct_id, | ||
const void * | address, | ||
const void * | data_ptr | ||
) |
Write single struct at address and specify a file-code.
Definition at line 1525 of file writefile.c.
References BlendWriter::wd, and writestruct_at_address_nr().
Referenced by BLO_write_struct_at_address_by_id().
void BLO_write_struct_by_id | ( | BlendWriter * | writer, |
int | struct_id, | ||
const void * | data_ptr | ||
) |
Definition at line 1512 of file writefile.c.
References DATA, BlendWriter::wd, and writestruct_nr().
Referenced by write_linestyle_alpha_modifiers(), write_linestyle_color_modifiers(), write_linestyle_geometry_modifiers(), and write_linestyle_thickness_modifiers().
void BLO_write_struct_by_name | ( | BlendWriter * | writer, |
const char * | struct_name, | ||
const void * | data_ptr | ||
) |
Write single struct.
Definition at line 1494 of file writefile.c.
References BLO_write_struct_array_by_name().
Referenced by BKE_constraint_blend_write(), BKE_fmodifiers_blend_write(), BKE_gpencil_modifier_blend_write(), BKE_modifier_blend_write(), BKE_pose_blend_write(), BKE_shaderfx_blend_write(), ntreeBlendWrite(), and SEQ_modifier_blend_write().
void BLO_write_struct_list_by_id | ( | BlendWriter * | writer, |
int | struct_id, | ||
struct ListBase * | list | ||
) |
Definition at line 1545 of file writefile.c.
References DATA, BlendWriter::wd, and writelist_nr().
Referenced by BLO_write_struct_list_by_name().
void BLO_write_struct_list_by_name | ( | BlendWriter * | writer, |
const char * | struct_name, | ||
struct ListBase * | list | ||
) |
Write struct list.
Definition at line 1550 of file writefile.c.
References BLO_get_struct_id_by_name(), BLO_write_struct_list_by_id(), CLOG_ERROR, LOG, and UNLIKELY.
void BLO_write_uint32_array | ( | BlendWriter * | writer, |
uint | num, | ||
const uint32_t * | data_ptr | ||
) |
Definition at line 1576 of file writefile.c.
References BLO_write_raw().
Referenced by BKE_previewimg_blend_write(), and blendWrite().