Blender V4.3
bake_items_serialize.cc File Reference
#include "BKE_bake_items.hh"
#include "BKE_bake_items_serialize.hh"
#include "BKE_curves.hh"
#include "BKE_customdata.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_instances.hh"
#include "BKE_lib_id.hh"
#include "BKE_mesh.hh"
#include "BKE_pointcloud.hh"
#include "BKE_volume.hh"
#include "BLI_endian_defines.h"
#include "BLI_endian_switch.h"
#include "BLI_math_matrix_types.hh"
#include "BLI_path_utils.hh"
#include "DNA_material_types.h"
#include "DNA_modifier_types.h"
#include "DNA_volume_types.h"
#include "RNA_access.hh"
#include "RNA_enum_types.hh"
#include <fmt/format.h>
#include <sstream>
#include <xxhash.h>

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::bake
 

Functions

static std::string blender::bke::bake::make_independent_file_name (const StringRef base_name, const int file_index, const StringRef extension)
 
static StringRefNull blender::bke::bake::get_endian_io_name (const int endian)
 
static StringRefNull blender::bke::bake::get_domain_io_name (const AttrDomain domain)
 
static StringRefNull blender::bke::bake::get_data_type_io_name (const eCustomDataType data_type)
 
static std::optional< AttrDomainblender::bke::bake::get_domain_from_io_name (const StringRefNull io_name)
 
static std::optional< eCustomDataTypeblender::bke::bake::get_data_type_from_io_name (const StringRefNull io_name)
 
static std::shared_ptr< DictionaryValueblender::bke::bake::write_blob_raw_data_with_endian (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const void *data, const int64_t size_in_bytes)
 
static bool blender::bke::bake::read_blob_raw_data_with_endian (const BlobReader &blob_reader, const DictionaryValue &io_data, const int64_t element_size, const int64_t elements_num, void *r_data)
 
static std::shared_ptr< DictionaryValueblender::bke::bake::write_blob_raw_bytes (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const void *data, const int64_t size_in_bytes)
 
static bool blender::bke::bake::read_blob_raw_bytes (const BlobReader &blob_reader, const DictionaryValue &io_data, const int64_t bytes_num, void *r_data)
 
static std::shared_ptr< DictionaryValueblender::bke::bake::write_blob_simple_gspan (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const GSpan data)
 
static bool blender::bke::bake::read_blob_simple_gspan (const BlobReader &blob_reader, const DictionaryValue &io_data, GMutableSpan r_data)
 
static std::shared_ptr< DictionaryValueblender::bke::bake::write_blob_shared_simple_gspan (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const GSpan data, const ImplicitSharingInfo *sharing_info)
 
static const void * blender::bke::bake::read_blob_shared_simple_gspan (const DictionaryValue &io_data, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing, const CPPType &cpp_type, const int size, const ImplicitSharingInfo **r_sharing_info)
 
template<typename T >
static bool blender::bke::bake::read_blob_shared_simple_span (const DictionaryValue &io_data, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing, const int size, T **r_data, const ImplicitSharingInfo **r_sharing_info)
 
static bool blender::bke::bake::load_materials (const io::serialize::ArrayValue &io_materials, std::unique_ptr< BakeMaterialsList > &materials)
 
static bool blender::bke::bake::load_attributes (const io::serialize::ArrayValue &io_attributes, MutableAttributeAccessor &attributes, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static PointCloudblender::bke::bake::try_load_pointcloud (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static std::optional< CurvesGeometryblender::bke::bake::try_load_curves_geometry (const DictionaryValue &io_curves, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static Curvesblender::bke::bake::try_load_curves (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static GreasePencilblender::bke::bake::try_load_grease_pencil (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static Meshblender::bke::bake::try_load_mesh (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static GeometrySet blender::bke::bake::load_geometry (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static std::unique_ptr< Instancesblender::bke::bake::try_load_instances (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
static std::shared_ptr< io::serialize::ArrayValueblender::bke::bake::serialize_materials (const std::unique_ptr< BakeMaterialsList > &materials)
 
static std::shared_ptr< io::serialize::ArrayValueblender::bke::bake::serialize_attributes (const AttributeAccessor &attributes, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const Set< std::string > &attributes_to_ignore)
 
static void blender::bke::bake::serialize_curves_geometry (DictionaryValue &io_curves, const CurvesGeometry &curves, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing)
 
static std::shared_ptr< DictionaryValueblender::bke::bake::serialize_geometry_set (const GeometrySet &geometry, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing)
 
static std::shared_ptr< io::serialize::ArrayValueblender::bke::bake::serialize_float_array (const Span< float > values)
 
static std::shared_ptr< io::serialize::ArrayValueblender::bke::bake::serialize_int_array (const Span< int > values)
 
static std::shared_ptr< io::serialize::Valueblender::bke::bake::serialize_primitive_value (const eCustomDataType data_type, const void *value_ptr)
 
template<typename T >
static bool blender::bke::bake::deserialize_typed_array (const io::serialize::Value &io_value, FunctionRef< std::optional< T >(const io::serialize::Value &io_element)> fn, MutableSpan< T > r_values)
 
template<typename T >
static std::optional< Tblender::bke::bake::deserialize_int (const io::serialize::Value &io_value)
 
static std::optional< floatblender::bke::bake::deserialize_float (const io::serialize::Value &io_value)
 
static bool blender::bke::bake::deserialize_float_array (const io::serialize::Value &io_value, MutableSpan< float > r_values)
 
template<typename T >
static bool blender::bke::bake::deserialize_int_array (const io::serialize::Value &io_value, MutableSpan< T > r_values)
 
static bool blender::bke::bake::deserialize_primitive_value (const io::serialize::Value &io_value, const eCustomDataType type, void *r_value)
 
static void blender::bke::bake::serialize_bake_item (const BakeItem &item, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item)
 
static std::unique_ptr< BakeItemblender::bke::bake::deserialize_bake_item (const DictionaryValue &io_item, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 
void blender::bke::bake::serialize_bake (const BakeState &bake_state, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, std::ostream &r_stream)
 
std::optional< BakeStateblender::bke::bake::deserialize_bake (std::istream &stream, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
 

Variables

static constexpr int blender::bke::bake::bake_file_version = 3