Blender V5.3
bake_items_serialize.cc File Reference
#include "BKE_anonymous_attribute_id.hh"
#include "BKE_attribute_legacy_convert.hh"
#include "BKE_bake_attribute_field.hh"
#include "BKE_bake_items_serialize.hh"
#include "BKE_curves.hh"
#include "BKE_customdata.hh"
#include "BKE_geometry_fields.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_generic_array.hh"
#include "BLI_listbase.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_path_utils.hh"
#include "BLI_string.hh"
#include "BLI_string_utf8.hh"
#include "DNA_object_types.h"
#include "DNA_volume_types.h"
#include "FN_field.hh"
#include "RNA_access.hh"
#include "RNA_enum_types.hh"
#include "NOD_geometry_nodes_bundle.hh"
#include "NOD_geometry_nodes_list.hh"
#include <fmt/format.h>
#include <sstream>
#include <xxhash.h>

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::bake

Typedefs

using blender::bke::bake::DictionaryValuePtr = std::shared_ptr<DictionaryValue>

Functions

static std::optional< SocketValueVariant > blender::bke::bake::deserialize_bake_item (const DictionaryValue &io_item, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static void blender::bke::bake::serialize_socket_value_variant (const SocketValueVariant &value_variant, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item)
static void blender::bke::bake::serialize_bundle_items (const nodes::Bundle &bundle, ArrayValue &r_io_items, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing)
static bool blender::bke::bake::deserialize_bundle_items (const io::serialize::ArrayValue &io_bundle_items, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing, nodes::Bundle &r_bundle)
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_domain_io_name (const AttrDomain domain)
static StringRefNull blender::bke::bake::get_data_type_io_name (const eCustomDataType data_type)
static StringRefNull blender::bke::bake::get_storage_type_io_name (const AttrStorageType storage_type)
static std::optional< AttrDomain > blender::bke::bake::get_domain_from_io_name (const StringRefNull io_name)
static std::optional< eCustomDataType > blender::bke::bake::get_data_type_from_io_name (const StringRefNull io_name)
static std::optional< AttrStorageType > blender::bke::bake::get_storage_type_from_io_name (const StringRefNull io_name)
static std::shared_ptr< DictionaryValue > blender::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< DictionaryValue > blender::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< DictionaryValue > blender::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 PointCloud * blender::bke::bake::try_load_pointcloud (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static std::optional< CurvesGeometry > blender::bke::bake::try_load_curves_geometry (const DictionaryValue &io_curves, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static Curves * blender::bke::bake::try_load_curves (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static GreasePencil * blender::bke::bake::try_load_grease_pencil (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static void blender::bke::bake::load_texspace (const DictionaryValue *io_mesh, Mesh *mesh)
static Mesh * blender::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< Instances > blender::bke::bake::try_load_instances (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static nodes::BundlePtr blender::bke::bake::try_load_geometry_bundle (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static std::shared_ptr< io::serialize::ArrayValue > blender::bke::bake::serialize_materials (const std::unique_ptr< BakeMaterialsList > &materials)
static std::shared_ptr< io::serialize::ArrayValue > blender::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 void blender::bke::bake::serialize_texture_space (const Mesh &mesh, std::shared_ptr< DictionaryValue > io_mesh)
static std::shared_ptr< DictionaryValue > blender::bke::bake::serialize_geometry_set (const GeometrySet &geometry, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing)
static std::shared_ptr< io::serialize::ArrayValue > blender::bke::bake::serialize_float_array (const Span< float > values)
static std::shared_ptr< io::serialize::ArrayValue > blender::bke::bake::serialize_int_array (const Span< int > values)
static std::shared_ptr< io::serialize::Value > blender::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< T > blender::bke::bake::deserialize_int (const io::serialize::Value &io_value)
static std::optional< float > blender::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_single_value (const GPointer value, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item)
static void blender::bke::bake::serialize_field (const fn::GField &field, BlobWriter &, BlobWriteSharing &, DictionaryValue &r_io_item)
static void blender::bke::bake::serialize_list (const nodes::GListPtr &list_ptr, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item)
template<typename T>
static std::optional< T > blender::bke::bake::deserialize_list_item (const DictionaryValue &io_value, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
template<typename T>
static std::optional< SocketValueVariant > blender::bke::bake::deserialize_value_list (const DictionaryValue &io_item, const int num_items, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing)
static void blender::bke::bake::serialize_bake_item (const BakeValues::Item &item, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item)
void blender::bke::bake::serialize_bake (const BakeValues &bake_values, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, std::ostream &r_stream)
std::optional< BakeValues > blender::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