|
Blender V4.3
|
Classes | |
| class | AttributeBakeItem |
| struct | BakeDataBlockID |
| struct | BakeDataBlockMap |
| class | BakeItem |
| struct | BakeMaterialsList |
| struct | BakeNodeCache |
| struct | BakePath |
| struct | BakeSocketConfig |
| struct | BakeState |
| struct | BakeStateRef |
| class | BlobReader |
| class | BlobReadSharing |
| struct | BlobSlice |
| class | BlobWriter |
| class | BlobWriteSharing |
| class | DiskBlobReader |
| class | DiskBlobWriter |
| struct | FrameCache |
| class | GeometryBakeItem |
| class | MemoryBlobReader |
| class | MemoryBlobWriter |
| struct | MetaFile |
| struct | ModifierCache |
| struct | NodeBakeCache |
| struct | PrevCache |
| class | PrimitiveBakeItem |
| struct | SimulationNodeCache |
| class | StringBakeItem |
Typedefs | |
| using | DictionaryValuePtr = std::shared_ptr<DictionaryValue> |
Enumerations | |
| enum class | CacheStatus { Valid , Invalid , Baked } |
| enum class | PackGeometryNodesBakeResult { NoDataFound , PackedAlready , Success } |
| enum class | UnpackGeometryNodesBakeResult { BlendFileNotSaved , NoPackedData , Error , Success } |
Functions | |
| void | scene_simulation_states_reset (Scene &scene) |
| std::optional< NodesModifierBakeTarget > | get_node_bake_target (const Object &object, const NodesModifierData &nmd, int node_id) |
| std::optional< BakePath > | get_node_bake_path (const Main &bmain, const Object &object, const NodesModifierData &nmd, int node_id) |
| std::optional< IndexRange > | get_node_bake_frame_range (const Scene &scene, const Object &object, const NodesModifierData &nmd, int node_id) |
| std::optional< std::string > | get_modifier_bake_path (const Main &bmain, const Object &object, const NodesModifierData &nmd) |
| std::string | get_default_modifier_bake_directory (const Main &bmain, const Object &object, const NodesModifierData &nmd) |
| std::string | get_default_node_bake_directory (const Main &bmain, const Object &object, const NodesModifierData &nmd, int node_id) |
| NodesModifierPackedBake * | pack_bake_from_disk (const BakePath &bake_path, ReportList *reports) |
| bool | unpack_bake_to_disk (const NodesModifierPackedBake &packed_bake, const BakePath &bake_path, ReportList *reports) |
| PackGeometryNodesBakeResult | pack_geometry_nodes_bake (Main &bmain, ReportList *reports, Object &object, NodesModifierData &nmd, NodesModifierBake &bake) |
| UnpackGeometryNodesBakeResult | unpack_geometry_nodes_bake (Main &bmain, ReportList *reports, Object &object, NodesModifierData &nmd, NodesModifierBake &bake, ePF_FileStatus how) |
| std::string | frame_to_file_name (const SubFrame &frame) |
| std::optional< SubFrame > | file_name_to_frame (const StringRef file_name) |
| Vector< MetaFile > | find_sorted_meta_files (const StringRefNull meta_dir) |
| void | serialize_bake (const BakeState &bake_state, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, std::ostream &r_stream) |
| std::optional< BakeState > | deserialize_bake (std::istream &stream, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| Array< std::unique_ptr< BakeItem > > | move_socket_values_to_bake_items (Span< void * > socket_values, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map) |
| void | move_bake_items_to_socket_values (Span< BakeItem * > bake_items, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map, FunctionRef< std::shared_ptr< AttributeFieldInput >(int socket_index, const CPPType &)> make_attribute_field, Span< void * > r_socket_values) |
| void | copy_bake_items_to_socket_values (Span< const BakeItem * > bake_items, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map, FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> make_attribute_field, Span< void * > r_socket_values) |
| std::ostream & | operator<< (std::ostream &stream, const BakeDataBlockID &id) |
| static IndexRange | fix_frame_range (const int start, const int end) |
| static std::string | escape_name (const StringRef name) |
| static std::string | get_blend_file_name (const Main &bmain) |
| static std::string | get_modifier_directory_name (const Object &object, const ModifierData &md) |
| static Vector< NodesModifierBakeFile > | pack_files_from_directory (const StringRefNull directory, ReportList *reports) |
| static bool | directory_is_empty (const blender::StringRefNull path) |
| static bool | disk_bake_exists (const blender::bke::bake::BakePath &path) |
| static std::unique_ptr< BakeMaterialsList > | materials_to_weak_references (Material ***materials, short *materials_num, BakeDataBlockMap *data_block_map) |
| static void | restore_materials (Material ***materials, short *materials_num, std::unique_ptr< BakeMaterialsList > materials_list, BakeDataBlockMap *data_block_map) |
| static std::string | make_independent_file_name (const StringRef base_name, const int file_index, const StringRef extension) |
| static StringRefNull | get_endian_io_name (const int endian) |
| static StringRefNull | get_domain_io_name (const AttrDomain domain) |
| static StringRefNull | get_data_type_io_name (const eCustomDataType data_type) |
| static std::optional< AttrDomain > | get_domain_from_io_name (const StringRefNull io_name) |
| static std::optional< eCustomDataType > | get_data_type_from_io_name (const StringRefNull io_name) |
| static std::shared_ptr< DictionaryValue > | write_blob_raw_data_with_endian (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const void *data, const int64_t size_in_bytes) |
| static bool | 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< DictionaryValue > | write_blob_raw_bytes (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const void *data, const int64_t size_in_bytes) |
| static bool | 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 > | write_blob_simple_gspan (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const GSpan data) |
| static bool | read_blob_simple_gspan (const BlobReader &blob_reader, const DictionaryValue &io_data, GMutableSpan r_data) |
| static std::shared_ptr< DictionaryValue > | write_blob_shared_simple_gspan (BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const GSpan data, const ImplicitSharingInfo *sharing_info) |
| static const void * | 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 | 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 | load_materials (const io::serialize::ArrayValue &io_materials, std::unique_ptr< BakeMaterialsList > &materials) |
| static bool | load_attributes (const io::serialize::ArrayValue &io_attributes, MutableAttributeAccessor &attributes, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static PointCloud * | try_load_pointcloud (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static std::optional< CurvesGeometry > | try_load_curves_geometry (const DictionaryValue &io_curves, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static Curves * | try_load_curves (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static GreasePencil * | try_load_grease_pencil (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static Mesh * | try_load_mesh (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static GeometrySet | load_geometry (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static std::unique_ptr< Instances > | try_load_instances (const DictionaryValue &io_geometry, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| static std::shared_ptr< io::serialize::ArrayValue > | serialize_materials (const std::unique_ptr< BakeMaterialsList > &materials) |
| static std::shared_ptr< io::serialize::ArrayValue > | serialize_attributes (const AttributeAccessor &attributes, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, const Set< std::string > &attributes_to_ignore) |
| static void | serialize_curves_geometry (DictionaryValue &io_curves, const CurvesGeometry &curves, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing) |
| static std::shared_ptr< DictionaryValue > | serialize_geometry_set (const GeometrySet &geometry, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing) |
| static std::shared_ptr< io::serialize::ArrayValue > | serialize_float_array (const Span< float > values) |
| static std::shared_ptr< io::serialize::ArrayValue > | serialize_int_array (const Span< int > values) |
| static std::shared_ptr< io::serialize::Value > | serialize_primitive_value (const eCustomDataType data_type, const void *value_ptr) |
| template<typename T > | |
| static bool | 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 > | deserialize_int (const io::serialize::Value &io_value) |
| static std::optional< float > | deserialize_float (const io::serialize::Value &io_value) |
| static bool | deserialize_float_array (const io::serialize::Value &io_value, MutableSpan< float > r_values) |
| template<typename T > | |
| static bool | deserialize_int_array (const io::serialize::Value &io_value, MutableSpan< T > r_values) |
| static bool | deserialize_primitive_value (const io::serialize::Value &io_value, const eCustomDataType type, void *r_value) |
| static void | serialize_bake_item (const BakeItem &item, BlobWriter &blob_writer, BlobWriteSharing &blob_sharing, DictionaryValue &r_io_item) |
| static std::unique_ptr< BakeItem > | deserialize_bake_item (const DictionaryValue &io_item, const BlobReader &blob_reader, const BlobReadSharing &blob_sharing) |
| Array< std::unique_ptr< BakeItem > > | move_socket_values_to_bake_items (const Span< void * > socket_values, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map) |
| static bool | copy_bake_item_to_socket_value (const BakeItem &bake_item, const eNodeSocketDatatype socket_type, const FunctionRef< std::shared_ptr< AttributeFieldInput >(const CPPType &type)> make_attribute_field, Map< std::string, std::string > &r_attribute_map, void *r_value) |
| static void | rename_attributes (const Span< GeometrySet * > geometries, const Map< std::string, std::string > &attribute_map) |
| static void | restore_data_blocks (const Span< GeometrySet * > geometries, BakeDataBlockMap *data_block_map) |
| static void | default_initialize_socket_value (const eNodeSocketDatatype socket_type, void *r_value) |
| void | move_bake_items_to_socket_values (const Span< BakeItem * > bake_items, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map, FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> make_attribute_field, const Span< void * > r_socket_values) |
| void | copy_bake_items_to_socket_values (const Span< const BakeItem * > bake_items, const BakeSocketConfig &config, BakeDataBlockMap *data_block_map, FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> make_attribute_field, const Span< void * > r_socket_values) |
Variables | |
| static constexpr int | bake_file_version = 3 |
| typedef std::shared_ptr< DictionaryValue > blender::bke::bake::DictionaryValuePtr = std::shared_ptr<DictionaryValue> |
Definition at line 24 of file bake_items.cc.
|
strong |
Definition at line 22 of file BKE_bake_geometry_nodes_modifier.hh.
|
strong |
| Enumerator | |
|---|---|
| NoDataFound | |
| PackedAlready | |
| Success | |
Definition at line 23 of file BKE_bake_geometry_nodes_modifier_pack.hh.
|
strong |
| Enumerator | |
|---|---|
| BlendFileNotSaved | |
| NoPackedData | |
| Error | |
| Success | |
Definition at line 35 of file BKE_bake_geometry_nodes_modifier_pack.hh.
|
staticnodiscard |
Definition at line 128 of file bake_items_socket.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::grid_type_to_socket_type(), SOCK_BOOLEAN, SOCK_FLOAT, SOCK_GEOMETRY, SOCK_INT, SOCK_MATRIX, SOCK_RGBA, SOCK_ROTATION, SOCK_STRING, SOCK_VECTOR, blender::bke::socket_type_to_geo_nodes_base_cpp_type(), and blender::bke::SocketValueVariant::store_single().
Referenced by copy_bake_items_to_socket_values(), and move_bake_items_to_socket_values().
| void blender::bke::bake::copy_bake_items_to_socket_values | ( | const Span< const BakeItem * > | bake_items, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map, | ||
| FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> | make_attribute_field, | ||
| const Span< void * > | r_socket_values ) |
Definition at line 290 of file bake_items_socket.cc.
References copy_bake_item_to_socket_value(), default_initialize_socket_value(), blender::Span< T >::index_range(), rename_attributes(), restore_data_blocks(), SOCK_GEOMETRY, and blender::bke::bake::BakeSocketConfig::types.
| void blender::bke::bake::copy_bake_items_to_socket_values | ( | Span< const BakeItem * > | bake_items, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map, | ||
| FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> | make_attribute_field, | ||
| Span< void * > | r_socket_values ) |
Similar to move_bake_items_to_socket_values, but does not change the bake items. Hence, this should be used when the bake items are still used later on.
Referenced by blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::copy_bake_state_to_values(), and blender::nodes::node_geo_simulation_cc::copy_simulation_state_to_values().
|
static |
Definition at line 237 of file bake_items_socket.cc.
References blender::CPPType::copy_construct(), blender::bke::bNodeSocketType::geometry_nodes_cpp_type, blender::bke::bNodeSocketType::geometry_nodes_default_cpp_value, blender::bke::node_socket_type_find(), blender::bke::node_static_socket_type(), and blender::CPPType::value_initialize().
Referenced by copy_bake_items_to_socket_values(), and move_bake_items_to_socket_values().
| std::optional< BakeState > blender::bke::bake::deserialize_bake | ( | std::istream & | stream, |
| const BlobReader & | blob_reader, | ||
| const BlobReadSharing & | blob_sharing ) |
Definition at line 1598 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_dictionary_value(), bake_file_version, blender::io::serialize::JsonFormatter::deserialize(), deserialize_bake(), deserialize_bake_item(), blender::io::serialize::DictionaryValue::elements(), blender::bke::bake::BakeState::items_by_id, blender::io::serialize::DictionaryValue::lookup_dict(), and blender::io::serialize::DictionaryValue::lookup_int().
Referenced by deserialize_bake(), and blender::ensure_bake_loaded().
|
static |
Definition at line 1479 of file bake_items_serialize.cc.
References deserialize_bake_item(), load_geometry(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_str(), and blender::bke::bake::BlobReader::read_as_stream().
Referenced by deserialize_bake(), and deserialize_bake_item().
|
static |
Definition at line 1342 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_double_value(), blender::io::serialize::Value::as_int_value(), and deserialize_float().
Referenced by deserialize_float(), deserialize_float_array(), and deserialize_primitive_value().
|
staticnodiscard |
Definition at line 1353 of file bake_items_serialize.cc.
References deserialize_float(), and deserialize_float_array().
Referenced by deserialize_float_array(), and deserialize_primitive_value().
|
static |
Definition at line 1326 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_int_value(), deserialize_int(), and blender::io::serialize::PrimitiveValue< T, V >::value().
Referenced by deserialize_int().
|
staticnodiscard |
Definition at line 1360 of file bake_items_serialize.cc.
References deserialize_int_array().
Referenced by deserialize_int_array().
|
staticnodiscard |
Definition at line 1367 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_boolean_value(), CD_PROP_BOOL, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, CD_PROP_FLOAT, CD_PROP_FLOAT2, CD_PROP_FLOAT3, CD_PROP_FLOAT4X4, CD_PROP_INT32, CD_PROP_INT32_2D, CD_PROP_QUATERNION, deserialize_float(), deserialize_float_array(), and deserialize_primitive_value().
Referenced by deserialize_primitive_value().
|
staticnodiscard |
Definition at line 1303 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_array_value(), deserialize_typed_array(), blender::io::serialize::ArrayValue::elements(), blender::MutableSpan< T >::index_range(), and blender::MutableSpan< T >::size().
Referenced by deserialize_typed_array().
|
static |
Definition at line 137 of file bake_geometry_nodes_modifier_pack.cc.
References BLI_filelist_dir_contents(), BLI_filelist_free(), and blender::StringRefNull::c_str().
Referenced by disk_bake_exists().
|
static |
Definition at line 145 of file bake_geometry_nodes_modifier_pack.cc.
References directory_is_empty(), and blender::bke::bake::BakePath::meta_dir.
Referenced by unpack_geometry_nodes_bake().
|
static |
Turn the name into something that can be used as file name. It does not necessarily have to be human readable, but it can help if it is at least partially readable.
Definition at line 203 of file bake_geometry_nodes_modifier.cc.
References int.
Referenced by get_modifier_directory_name().
Definition at line 22 of file bake_items_paths.cc.
References BLI_string_replace_char(), blender::StringRefBase::copy(), and FILE_MAX.
Referenced by find_sorted_meta_files(), and blender::try_find_baked_data().
| Vector< MetaFile > blender::bke::bake::find_sorted_meta_files | ( | const StringRefNull | meta_dir | ) |
Definition at line 36 of file bake_items_paths.cc.
References b, BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_is_dir(), BLI_SCOPED_DEFER, blender::StringRefNull::c_str(), blender::StringRefBase::endswith(), file_name_to_frame(), direntry::path, and direntry::relname.
Referenced by blender::try_find_baked_data().
|
static |
Definition at line 175 of file bake_geometry_nodes_modifier.cc.
Referenced by get_node_bake_frame_range().
| std::string blender::bke::bake::frame_to_file_name | ( | const SubFrame & | frame | ) |
Definition at line 14 of file bake_items_paths.cc.
References BLI_string_replace_char(), FILE_MAX, and SNPRINTF.
Referenced by blender::ed::object::bake_simulation::bake_geometry_nodes_startjob().
|
static |
Definition at line 218 of file bake_geometry_nodes_modifier.cc.
References BKE_main_blendfile_path(), BLI_path_split_file_part(), blender::StringRefNull::c_str(), FILE_MAX, blender::StringRefBase::not_found, and blender::StringRefBase::rfind().
Referenced by get_default_modifier_bake_directory(), and get_default_node_bake_directory().
|
static |
Definition at line 320 of file bake_items_serialize.cc.
References blender::StringRefNull::c_str(), rna_enum_attribute_type_items, and RNA_enum_value_from_identifier().
Referenced by load_attributes().
|
static |
Definition at line 304 of file bake_items_serialize.cc.
References rna_enum_attribute_type_items, and RNA_enum_id_from_value().
Referenced by serialize_attributes(), and serialize_bake_item().
| std::string blender::bke::bake::get_default_modifier_bake_directory | ( | const Main & | bmain, |
| const Object & | object, | ||
| const NodesModifierData & | nmd ) |
Get default directory for baking modifier to disk.
Definition at line 239 of file bake_geometry_nodes_modifier.cc.
References BLI_path_join, FILE_MAX, get_blend_file_name(), get_modifier_directory_name(), and NodesModifierData::modifier.
Referenced by blender::ed::object::bake_simulation::initialize_modifier_bake_directory_if_necessary().
| std::string blender::bke::bake::get_default_node_bake_directory | ( | const Main & | bmain, |
| const Object & | object, | ||
| const NodesModifierData & | nmd, | ||
| int | node_id ) |
Definition at line 253 of file bake_geometry_nodes_modifier.cc.
References BLI_path_join, FILE_MAX, get_blend_file_name(), get_modifier_directory_name(), and NodesModifierData::modifier.
Referenced by unpack_geometry_nodes_bake().
|
static |
Definition at line 311 of file bake_items_serialize.cc.
References blender::StringRefNull::c_str(), rna_enum_attribute_domain_items, and RNA_enum_value_from_identifier().
Referenced by load_attributes().
|
static |
Definition at line 297 of file bake_items_serialize.cc.
References rna_enum_attribute_domain_items, and RNA_enum_id_from_value().
Referenced by serialize_attributes().
|
static |
Definition at line 288 of file bake_items_serialize.cc.
References B_ENDIAN, BLI_assert, and L_ENDIAN.
Referenced by read_blob_raw_data_with_endian(), and write_blob_raw_data_with_endian().
| std::optional< std::string > blender::bke::bake::get_modifier_bake_path | ( | const Main & | bmain, |
| const Object & | object, | ||
| const NodesModifierData & | nmd ) |
Definition at line 103 of file bake_geometry_nodes_modifier.cc.
References NodesModifierData::bake_directory, BLI_path_abs(), BLI_path_is_rel(), FILE_MAX, ID_BLEND_PATH, blender::StringRefBase::is_empty(), and STRNCPY.
Referenced by get_node_bake_path(), and blender::ed::object::bake_simulation::try_delete_bake().
|
static |
Definition at line 232 of file bake_geometry_nodes_modifier.cc.
References escape_name(), and ModifierData::name.
Referenced by get_default_modifier_bake_directory(), and get_default_node_bake_directory().
| std::optional< IndexRange > blender::bke::bake::get_node_bake_frame_range | ( | const Scene & | scene, |
| const Object & | object, | ||
| const NodesModifierData & | nmd, | ||
| int | node_id ) |
Definition at line 181 of file bake_geometry_nodes_modifier.cc.
References fix_frame_range(), NODES_MODIFIER_BAKE_CUSTOM_SIMULATION_FRAME_RANGE, and SCE_CUSTOM_SIMULATION_RANGE.
Referenced by blender::ed::object::bake_simulation::bake_single_node_gather_bake_request(), blender::ed::object::bake_simulation::collect_simulations_to_bake(), blender::nodes::get_bake_draw_context(), blender::NodesModifierSimulationParams::init_simulation_info(), and blender::NodesModifierSimulationParams::reset_invalid_node_bakes().
| std::optional< bake::BakePath > blender::bke::bake::get_node_bake_path | ( | const Main & | bmain, |
| const Object & | object, | ||
| const NodesModifierData & | nmd, | ||
| int | node_id ) |
Definition at line 140 of file bake_geometry_nodes_modifier.cc.
References BLI_path_abs(), BLI_path_is_rel(), BLI_path_join, FILE_MAX, blender::bke::bake::BakePath::from_single_root(), get_modifier_bake_path(), ID_BLEND_PATH, blender::StringRefBase::is_empty(), NODES_MODIFIER_BAKE_CUSTOM_PATH, and STRNCPY.
Referenced by blender::ed::object::bake_simulation::bake_single_node_gather_bake_request(), blender::ed::object::bake_simulation::collect_simulations_to_bake(), blender::nodes::draw_common_bake_settings(), pack_geometry_nodes_bake(), blender::ed::object::bake_simulation::pack_single_bake_exec(), blender::ed::object::bake_simulation::try_delete_bake(), blender::try_find_baked_data(), and unpack_geometry_nodes_bake().
| std::optional< NodesModifierBakeTarget > blender::bke::bake::get_node_bake_target | ( | const Object & | object, |
| const NodesModifierData & | nmd, | ||
| int | node_id ) |
Definition at line 123 of file bake_geometry_nodes_modifier.cc.
References NodesModifierData::bake_target, NODES_MODIFIER_BAKE_TARGET_INHERIT, and NODES_MODIFIER_BAKE_TARGET_PACKED.
Referenced by blender::ed::object::bake_simulation::bake_single_node_gather_bake_request(), blender::ed::object::bake_simulation::collect_simulations_to_bake(), and blender::nodes::get_bake_draw_context().
|
staticnodiscard |
Definition at line 536 of file bake_items_serialize.cc.
References BLI_SCOPED_DEFER, blender::CPPType::copy_assign_n(), blender::bke::custom_data_type_to_cpp_type(), blender::io::serialize::ArrayValue::elements(), get_data_type_from_io_name(), get_domain_from_io_name(), blender::io::serialize::DictionaryValue::lookup_dict(), read_blob_shared_simple_gspan(), and blender::ImplicitSharingInfo::remove_user_and_delete_if_last().
Referenced by try_load_curves_geometry(), try_load_grease_pencil(), try_load_instances(), try_load_mesh(), and try_load_pointcloud().
|
static |
Definition at line 992 of file bake_items_serialize.cc.
References load_geometry(), blender::bke::GeometrySet::replace_mesh(), try_load_curves(), try_load_grease_pencil(), try_load_instances(), try_load_mesh(), and try_load_pointcloud().
Referenced by deserialize_bake_item(), load_geometry(), and try_load_instances().
|
staticnodiscard |
Definition at line 510 of file bake_items_serialize.cc.
References blender::io::serialize::ArrayValue::elements(), ID_MA, id_name(), and blender::io::serialize::Null.
Referenced by try_load_curves(), try_load_curves_geometry(), try_load_grease_pencil(), try_load_mesh(), and try_load_pointcloud().
|
static |
Definition at line 134 of file bake_items_serialize.cc.
Referenced by blender::bke::bake::DiskBlobWriter::write_as_stream(), and blender::bke::bake::MemoryBlobWriter::write_as_stream().
|
static |
Definition at line 33 of file bake_items.cc.
References MEM_SAFE_FREE, and blender::bke::bake::BakeDataBlockMap::try_add().
Referenced by blender::bke::bake::GeometryBakeItem::prepare_geometry_for_bake().
| void blender::bke::bake::move_bake_items_to_socket_values | ( | const Span< BakeItem * > | bake_items, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map, | ||
| FunctionRef< std::shared_ptr< AttributeFieldInput >(int, const CPPType &)> | make_attribute_field, | ||
| const Span< void * > | r_socket_values ) |
Definition at line 250 of file bake_items_socket.cc.
References blender::bke::GeometrySet::clear(), copy_bake_item_to_socket_value(), default_initialize_socket_value(), blender::bke::bake::GeometryBakeItem::geometry, blender::Span< T >::index_range(), rename_attributes(), restore_data_blocks(), SOCK_GEOMETRY, and blender::bke::bake::BakeSocketConfig::types.
| void blender::bke::bake::move_bake_items_to_socket_values | ( | Span< BakeItem * > | bake_items, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map, | ||
| FunctionRef< std::shared_ptr< AttributeFieldInput >(int socket_index, const CPPType &)> | make_attribute_field, | ||
| Span< void * > | r_socket_values ) |
Create socket values from bake items.
| make_attribute_field | A function that creates a field input for any anonymous attributes being created for the baked data. |
| r_socket_values | The caller is expected to allocate (but not construct) the output values. All socket values are constructed in this function. |
Referenced by blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::move_bake_state_to_values(), and blender::nodes::node_geo_simulation_cc::move_simulation_state_to_values().
| Array< std::unique_ptr< BakeItem > > blender::bke::bake::move_socket_values_to_bake_items | ( | const Span< void * > | socket_values, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map ) |
Definition at line 13 of file bake_items_socket.cc.
References BLI_assert, blender::bke::bake::BakeSocketConfig::domains, blender::bke::bake::BakeSocketConfig::geometries_by_attribute, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::bke::bake::BakeSocketConfig::names, blender::bke::bake::GeometryBakeItem::prepare_geometry_for_bake(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SOCK_BOOLEAN, SOCK_FLOAT, SOCK_GEOMETRY, SOCK_INT, SOCK_MATRIX, SOCK_RGBA, SOCK_ROTATION, SOCK_STRING, SOCK_VECTOR, blender::bke::try_capture_field_on_geometry(), and blender::bke::bake::BakeSocketConfig::types.
| Array< std::unique_ptr< BakeItem > > blender::bke::bake::move_socket_values_to_bake_items | ( | Span< void * > | socket_values, |
| const BakeSocketConfig & | config, | ||
| BakeDataBlockMap * | data_block_map ) |
Create new bake items from the socket values. The socket values are not destructed, but they may be in a moved-from state afterwards.
Referenced by blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::get_bake_state_from_inputs(), and blender::nodes::node_geo_simulation_cc::move_values_to_simulation_state().
| std::ostream & blender::bke::bake::operator<< | ( | std::ostream & | stream, |
| const BakeDataBlockID & | id ) |
Definition at line 37 of file bake_data_block_map.cc.
| NodesModifierPackedBake * blender::bke::bake::pack_bake_from_disk | ( | const BakePath & | bake_path, |
| ReportList * | reports ) |
Definition at line 51 of file bake_geometry_nodes_modifier_pack.cc.
References NodesModifierPackedBake::blob_files, NodesModifierPackedBake::blob_files_num, blender::bke::bake::BakePath::blobs_dir, blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::bake::BakePath::meta_dir, NodesModifierPackedBake::meta_files, NodesModifierPackedBake::meta_files_num, pack_files_from_directory(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::uninitialized_copy_n().
Referenced by pack_geometry_nodes_bake().
|
static |
Definition at line 23 of file bake_geometry_nodes_modifier_pack.cc.
References BKE_packedfile_new(), BKE_reportf(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_is_dir(), BLI_SCOPED_DEFER, BLI_strdup_null(), blender::StringRefNull::c_str(), NodesModifierBakeFile::name, NodesModifierBakeFile::packed_file, direntry::path, direntry::relname, and RPT_ERROR.
Referenced by pack_bake_from_disk().
| PackGeometryNodesBakeResult blender::bke::bake::pack_geometry_nodes_bake | ( | Main & | bmain, |
| ReportList * | reports, | ||
| Object & | object, | ||
| NodesModifierData & | nmd, | ||
| NodesModifierBake & | bake ) |
Definition at line 114 of file bake_geometry_nodes_modifier_pack.cc.
References DEG_id_tag_update(), get_node_bake_path(), ID_RECALC_GEOMETRY, NoDataFound, NODES_MODIFIER_BAKE_TARGET_PACKED, pack_bake_from_disk(), PackedAlready, NodesModifierData::runtime, and Success.
Referenced by BKE_packedfile_pack_all(), and blender::ed::object::bake_simulation::pack_single_bake_exec().
|
staticnodiscard |
Read bytes ignoring endianness.
Definition at line 397 of file bake_items_serialize.cc.
References blender::bke::bake::BlobSlice::deserialize(), and blender::bke::bake::BlobReader::read().
Referenced by read_blob_simple_gspan().
|
staticnodiscard |
Read data of an into an array and optionally perform an endian switch if necessary.
Definition at line 348 of file bake_items_serialize.cc.
References BLI_endian_switch_uint16_array(), BLI_endian_switch_uint32_array(), BLI_endian_switch_uint64_array(), blender::bke::bake::BlobSlice::deserialize(), ENDIAN_ORDER, get_endian_io_name(), blender::io::serialize::DictionaryValue::lookup_str(), and blender::bke::bake::BlobReader::read().
Referenced by read_blob_simple_gspan().
|
staticnodiscard |
Definition at line 471 of file bake_items_serialize.cc.
References blender::CPPType::alignment(), blender::implicit_sharing::info_for_mem_free(), MEM_freeN(), MEM_mallocN_aligned(), read_blob_simple_gspan(), blender::bke::bake::BlobReadSharing::read_shared(), and blender::CPPType::size().
Referenced by load_attributes(), and read_blob_shared_simple_span().
|
staticnodiscard |
Definition at line 498 of file bake_items_serialize.cc.
References blender::CPPType::get(), and read_blob_shared_simple_gspan().
Referenced by try_load_curves_geometry(), and try_load_mesh().
|
staticnodiscard |
Definition at line 425 of file bake_items_serialize.cc.
References BLI_assert, blender::GMutableSpan::data(), read_blob_raw_bytes(), read_blob_raw_data_with_endian(), blender::GMutableSpan::size(), blender::GMutableSpan::size_in_bytes(), and blender::GMutableSpan::type().
Referenced by read_blob_shared_simple_gspan(), try_load_grease_pencil(), and try_load_instances().
|
static |
Definition at line 198 of file bake_items_socket.cc.
References blender::bke::GeometryComponent::attributes_for_write(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::begin(), blender::bke::GeometryComponent::Curve, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::end(), blender::bke::GeometryComponent::GreasePencil, blender::bke::GeometryComponent::Instance, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::keys(), blender::bke::GeometryComponent::Mesh, and blender::bke::GeometryComponent::PointCloud.
Referenced by copy_bake_items_to_socket_values(), and move_bake_items_to_socket_values().
|
static |
Definition at line 229 of file bake_items_socket.cc.
References blender::bke::bake::GeometryBakeItem::try_restore_data_blocks().
Referenced by copy_bake_items_to_socket_values(), and move_bake_items_to_socket_values().
|
static |
Definition at line 105 of file bake_items.cc.
References BLI_assert, blender::bke::bake::BakeDataBlockMap::lookup_or_remember_missing(), and restore_materials().
Referenced by restore_materials().
| void blender::bke::bake::scene_simulation_states_reset | ( | Scene & | scene | ) |
Reset all simulation caches in the scene, for use when some fundamental change made them impossible to reuse.
Definition at line 84 of file bake_geometry_nodes_modifier.cc.
References eModifierType_Nodes, FOREACH_SCENE_OBJECT_BEGIN, FOREACH_SCENE_OBJECT_END, LISTBASE_FOREACH, and NodesModifierData::runtime.
|
static |
Definition at line 1030 of file bake_items_serialize.cc.
References blender::bke::attribute_name_is_anonymous(), BLI_assert, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::AttributeIter::get(), get_data_type_io_name(), get_domain_io_name(), blender::bke::AttributeIter::name, serialize_attributes(), and write_blob_shared_simple_gspan().
Referenced by serialize_attributes(), serialize_curves_geometry(), and serialize_geometry_set().
| void blender::bke::bake::serialize_bake | ( | const BakeState & | bake_state, |
| BlobWriter & | blob_writer, | ||
| BlobWriteSharing & | blob_sharing, | ||
| std::ostream & | r_stream ) |
Definition at line 1581 of file bake_items_serialize.cc.
References blender::io::serialize::DictionaryValue::append_dict(), blender::io::serialize::DictionaryValue::append_int(), bake_file_version, blender::bke::bake::BakeState::items_by_id, blender::io::serialize::JsonFormatter::serialize(), serialize_bake(), and serialize_bake_item().
Referenced by blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), and serialize_bake().
|
static |
Definition at line 1422 of file bake_items_serialize.cc.
References blender::io::serialize::DictionaryValue::append(), blender::io::serialize::DictionaryValue::append_str(), blender::bke::cpp_type_to_custom_data_type(), get_data_type_io_name(), blender::bke::bake::BakeItem::name, serialize(), serialize_bake_item(), serialize_geometry_set(), serialize_primitive_value(), str, blender::bke::bake::BlobWriter::write_as_stream(), and write_blob_raw_bytes().
Referenced by serialize_bake(), and serialize_bake_item().
|
static |
Definition at line 1065 of file bake_items_serialize.cc.
References blender::io::serialize::DictionaryValue::append(), blender::io::serialize::DictionaryValue::append_int(), serialize_attributes(), serialize_curves_geometry(), and write_blob_shared_simple_gspan().
Referenced by serialize_curves_geometry(), and serialize_geometry_set().
|
static |
Definition at line 1232 of file bake_items_serialize.cc.
References serialize_float_array().
Referenced by serialize_float_array(), and serialize_primitive_value().
|
static |
Definition at line 1085 of file bake_items_serialize.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_as(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), Geometry::attributes, BKE_volume_grid_get(), BKE_volume_num_grids(), Curves::geometry, blender::bke::InstanceReference::GeometrySet, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), GreasePencil::runtime, PointCloud::runtime, serialize(), serialize_attributes(), serialize_curves_geometry(), serialize_geometry_set(), serialize_materials(), blender::bke::greasepencil::Drawing::strokes(), PointCloud::totpoint, blender::bke::bake::BlobWriter::write_as_stream(), write_blob_shared_simple_gspan(), and write_blob_simple_gspan().
Referenced by serialize_bake_item(), and serialize_geometry_set().
|
static |
Definition at line 1241 of file bake_items_serialize.cc.
References serialize_int_array().
Referenced by serialize_int_array(), and serialize_primitive_value().
|
static |
Definition at line 1008 of file bake_items_serialize.cc.
References serialize_materials().
Referenced by serialize_geometry_set(), and serialize_materials().
|
static |
Definition at line 1250 of file bake_items_serialize.cc.
References BLI_assert_unreachable, CD_PROP_BOOL, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, CD_PROP_FLOAT, CD_PROP_FLOAT2, CD_PROP_FLOAT3, CD_PROP_FLOAT4X4, CD_PROP_INT32, CD_PROP_INT32_2D, CD_PROP_QUATERNION, serialize_float_array(), serialize_int_array(), and serialize_primitive_value().
Referenced by serialize_bake_item(), and serialize_primitive_value().
|
static |
Definition at line 675 of file bake_items_serialize.cc.
References BKE_id_free(), blender::bke::curves_new_nomain(), Curves::geometry, load_materials(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), and try_load_curves_geometry().
Referenced by load_geometry().
|
static |
Definition at line 630 of file bake_items_serialize.cc.
References CustomData_free_layer_named(), load_attributes(), load_materials(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_int(), and read_blob_shared_simple_span().
Referenced by try_load_curves(), and try_load_grease_pencil().
|
static |
Definition at line 712 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_dictionary_value(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BKE_grease_pencil_new_nomain(), BKE_id_free(), blender::io::serialize::ArrayValue::elements(), load_attributes(), load_materials(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_str(), read_blob_simple_gspan(), GreasePencil::runtime, blender::bke::greasepencil::Drawing::strokes_for_write(), and try_load_curves_geometry().
Referenced by load_geometry().
|
static |
Definition at line 877 of file bake_items_serialize.cc.
References blender::io::serialize::Value::as_dictionary_value(), blender::io::serialize::ArrayValue::elements(), load_attributes(), load_geometry(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_int(), and read_blob_simple_gspan().
Referenced by load_geometry().
|
static |
Definition at line 814 of file bake_items_serialize.cc.
References BKE_id_free(), BKE_mesh_new_nomain(), CustomData_free_layer_named(), load_attributes(), load_materials(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_int(), and read_blob_shared_simple_span().
Referenced by load_geometry().
|
static |
Definition at line 596 of file bake_items_serialize.cc.
References BKE_id_free(), BKE_pointcloud_new_nomain(), CustomData_free_layer_named(), load_attributes(), load_materials(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_int(), PointCloud::pdata, PointCloud::runtime, and PointCloud::totpoint.
Referenced by load_geometry().
|
nodiscard |
Definition at line 77 of file bake_geometry_nodes_modifier_pack.cc.
References BKE_reportf(), BLI_file_ensure_parent_dir_exists(), BLI_path_join, NodesModifierPackedBake::blob_files, NodesModifierPackedBake::blob_files_num, blender::bke::bake::BakePath::blobs_dir, blender::StringRefNull::c_str(), FILE_MAX, blender::bke::bake::BakePath::meta_dir, NodesModifierPackedBake::meta_files, NodesModifierPackedBake::meta_files_num, and RPT_ERROR.
Referenced by unpack_geometry_nodes_bake().
| UnpackGeometryNodesBakeResult blender::bke::bake::unpack_geometry_nodes_bake | ( | Main & | bmain, |
| ReportList * | reports, | ||
| Object & | object, | ||
| NodesModifierData & | nmd, | ||
| NodesModifierBake & | bake, | ||
| ePF_FileStatus | how ) |
Definition at line 150 of file bake_geometry_nodes_modifier_pack.cc.
References BKE_main_blendfile_path(), BKE_report(), BlendFileNotSaved, BLI_delete(), BLI_path_abs(), BLI_strdup(), DEG_id_tag_update(), disk_bake_exists(), Error, FILE_MAX, blender::bke::bake::BakePath::from_single_root(), get_default_node_bake_directory(), get_node_bake_path(), ID_BLEND_PATH, ID_RECALC_GEOMETRY, MEM_SAFE_FREE, NODES_MODIFIER_BAKE_CUSTOM_PATH, NODES_MODIFIER_BAKE_TARGET_DISK, blender::nodes_modifier_packed_bake_free(), NoPackedData, PF_KEEP, PF_REMOVE, PF_USE_LOCAL, PF_USE_ORIGINAL, PF_WRITE_LOCAL, PF_WRITE_ORIGINAL, RPT_ERROR, NodesModifierData::runtime, STRNCPY, Success, and unpack_bake_to_disk().
Referenced by BKE_packedfile_unpack_all(), and blender::ed::object::bake_simulation::unpack_single_bake_exec().
|
static |
Write bytes ignoring endianness.
Definition at line 388 of file bake_items_serialize.cc.
References blender::bke::bake::BlobWriteSharing::write_deduplicated().
Referenced by serialize_bake_item(), and write_blob_simple_gspan().
|
static |
Write the data and remember which endianness the data had.
Definition at line 332 of file bake_items_serialize.cc.
References blender::io::serialize::DictionaryValue::append_str(), B_ENDIAN, ENDIAN_ORDER, get_endian_io_name(), and blender::bke::bake::BlobWriteSharing::write_deduplicated().
Referenced by write_blob_simple_gspan().
|
static |
Definition at line 461 of file bake_items_serialize.cc.
References write_blob_simple_gspan(), and blender::bke::bake::BlobWriteSharing::write_implicitly_shared().
Referenced by serialize_attributes(), serialize_curves_geometry(), and serialize_geometry_set().
|
static |
Definition at line 412 of file bake_items_serialize.cc.
References BLI_assert, write_blob_raw_bytes(), and write_blob_raw_data_with_endian().
Referenced by serialize_geometry_set(), and write_blob_shared_simple_gspan().
|
staticconstexpr |
Definition at line 1579 of file bake_items_serialize.cc.
Referenced by deserialize_bake(), and serialize_bake().