|
Blender V5.3
|
Classes | |
| struct | CachedFileHash |
| struct | DeepHashErrors |
| struct | ValidDeepHashes |
Typedefs | |
| using | IDHashResult = std::variant<ValidDeepHashes, DeepHashErrors> |
Functions | |
| IDHashResult | compute_linked_id_deep_hashes (const Main &bmain, Span< const ID * > root_ids) |
| std::string | id_hash_to_hex (const IDHash &hash) |
| static std::optional< Vector< char > > | read_file (const StringRefNull path) |
| static std::optional< XXH128_hash_t > | compute_file_hash_with_file_read (const StringRefNull path) |
| static std::optional< XXH128_hash_t > | compute_file_hash_with_memory_map (const StringRefNull path) |
| static std::optional< XXH128_hash_t > | compute_file_hash (const StringRefNull path) |
| static std::optional< XXH128_hash_t > | get_source_file_hash (const ID &id, DeepHashErrors &r_errors) |
| static std::optional< XXH128_hash_t > | get_id_shallow_hash (const ID &id, DeepHashErrors &r_errors) |
| static void | compute_deep_hash_recursive (const Main &bmain, const ID &id, Set< const ID * > ¤t_stack, Map< const ID *, IDHash > &r_hashes, DeepHashErrors &r_errors) |
| using blender::bke::id_hash::IDHashResult = std::variant<ValidDeepHashes, DeepHashErrors> |
Definition at line 47 of file BKE_id_hash.hh.
|
static |
Definition at line 157 of file id_hash.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::BKE_library_foreach_ID_link(), blender::BLI_assert(), BLI_SCOPED_DEFER, blender::LibraryIDLinkCallbackData::cb_flag, compute_deep_hash_recursive(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::IDHash::data, blender::ID::flag, get_id_shallow_hash(), blender::ID_FLAG_EMBEDDED_DATA, blender::LibraryIDLinkCallbackData::id_pointer, blender::IDWALK_CB_EMBEDDED, blender::IDWALK_CB_EMBEDDED_NOT_OWNING, blender::IDWALK_CB_HASH_IGNORE, blender::IDWALK_CB_LOOPBACK, blender::IDWALK_READONLY, blender::IDWALK_RET_NOP, blender::IDWALK_RET_STOP_ITER, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by compute_deep_hash_recursive(), and compute_linked_id_deep_hashes().
|
static |
Definition at line 79 of file id_hash.cc.
References blender::BLI_assert(), compute_file_hash(), compute_file_hash_with_file_read(), compute_file_hash_with_memory_map(), and hash.
Referenced by compute_file_hash(), and get_source_file_hash().
|
static |
Definition at line 48 of file id_hash.cc.
References compute_file_hash_with_file_read(), and read_file().
Referenced by compute_file_hash(), and compute_file_hash_with_file_read().
|
static |
Definition at line 57 of file id_hash.cc.
References blender::BLI_mmap_any_io_error(), blender::BLI_mmap_free(), blender::BLI_mmap_get_length(), blender::BLI_mmap_get_pointer(), blender::BLI_mmap_open(), blender::BLI_open(), BLI_SCOPED_DEFER, blender::StringRefNull::c_str(), compute_file_hash_with_memory_map(), blender::data, hash, and O_BINARY.
Referenced by compute_file_hash(), and compute_file_hash_with_memory_map().
| IDHashResult blender::bke::id_hash::compute_linked_id_deep_hashes | ( | const Main & | bmain, |
| Span< const ID * > | root_ids ) |
Compute a hash of the given IDs, including all their dependencies. This needs access to the original .blend files that the linked data-blocks come from to be able to compute their hash.
Definition at line 241 of file id_hash.cc.
References blender::BLI_assert(), compute_deep_hash_recursive(), compute_linked_id_deep_hashes(), ID_IS_LINKED, blender::Span< T >::is_empty(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::bke::id_hash::DeepHashErrors::missing_files, blender::bke::id_hash::DeepHashErrors::missing_from_files, and blender::bke::id_hash::DeepHashErrors::updated_files.
Referenced by compute_linked_id_deep_hashes(), and blender::pack_linked_ids().
|
static |
Definition at line 139 of file id_hash.cc.
References blender::BLI_assert(), blender::blender::StringRefBase::data(), get_id_shallow_hash(), get_source_file_hash(), ID_IS_LINKED, and blender::blender::StringRefBase::size().
Referenced by compute_deep_hash_recursive(), and get_id_shallow_hash().
|
static |
Definition at line 98 of file id_hash.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), blender::BLI_stat(), blender::StringRefNull::c_str(), compute_file_hash(), get_source_file_hash(), hash, blender::ID_TAG_MISSING, lock, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), blender::bke::id_hash::DeepHashErrors::missing_files, blender::bke::id_hash::DeepHashErrors::missing_from_files, and blender::bke::id_hash::DeepHashErrors::updated_files.
Referenced by get_id_shallow_hash(), and get_source_file_hash().
| std::string blender::bke::id_hash::id_hash_to_hex | ( | const IDHash & | hash | ) |
Utility to convert the hash into a readable string.
Definition at line 267 of file id_hash.cc.
References hash, and id_hash_to_hex().
Referenced by id_hash_to_hex().
|
static |
Definition at line 32 of file id_hash.cc.
References blender::StringRefNull::c_str(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), and read_file().
Referenced by compute_file_hash_with_file_read(), and read_file().