|
Blender V5.3
|
#include <BLO_read_write.hh>
Inherited by blender::BlendStructWriter< T >.
Public Member Functions | |
| BlendStructWriterVoid (WriteData &wd, const int struct_nr, MutableSpan< char > data) | |
| template<typename T> | |
| BlendStructWriter< T > | typed () |
Generic DNA File Writing | |
| void | generated_ptr (int64_t offset) |
Protected Attributes | |
| WriteData * | wd_ |
| int | struct_nr_ |
| MutableSpan< char > | data_ |
Allows code using BlendWriter to customize how a specific struct is written. Often, small changes to the struct data are done before it is written (e.g. zeroing runtime pointers and setting generated pointers).
Use typed to get a typed view of the shallow copy that will be written.
Definition at line 67 of file BLO_read_write.hh.
|
inline |
Definition at line 75 of file BLO_read_write.hh.
References blender::data, data_, struct_nr_, and wd_.
Referenced by blender::BlendStructWriter< T >::BlendStructWriter().
| void blender::BlendStructWriterVoid::generated_ptr | ( | int64_t | offset | ) |
Tag the pointer at the given offset as "generated". That implies that it may be remapped to a stable pointer. It's expected that the pointer has been tagged with #generated_pointer_tag before.
Definition at line 986 of file writefile.cc.
References blender::BLI_assert(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), data_, blender::get_address_id(), blender::dna::pointers::StructInfo::has_pointer_at_offset(), blender::WriteDataStableAddressIDs::pointer_map, POINTER_OFFSET, blender::WriteDataStableAddressIDs::sdna_pointers, blender::WriteData::stable_address_ids, struct_nr_, UNUSED_VARS_NDEBUG, blender::WriteData::use_memfile, and wd_.
Referenced by blender::curves_blend_write(), blender::grease_pencil_blend_write(), blender::mesh_blend_write(), and blender::pointcloud_blend_write().
|
inline |
Definition at line 104 of file BLO_read_write.hh.
References blender::BlendStructWriter< T >::BlendStructWriter(), blender::BLI_assert(), blender::dna::sdna_struct_id_get(), and struct_nr_.
|
protected |
This is a shallow copy of the struct being written.
Definition at line 72 of file BLO_read_write.hh.
Referenced by blender::BlendStructWriter< T >::BlendStructWriter(), BlendStructWriterVoid(), and generated_ptr().
|
protected |
Definition at line 70 of file BLO_read_write.hh.
Referenced by BlendStructWriterVoid(), generated_ptr(), and typed().
|
protected |
Definition at line 69 of file BLO_read_write.hh.
Referenced by BlendStructWriterVoid(), and generated_ptr().