|
Blender V5.0
|
Classes | |
| struct | ValidDeepHashes |
| struct | DeepHashErrors |
| struct | CachedFileHash |
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 37 of file BKE_id_hash.hh.
|
static |
Definition at line 149 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(), BKE_library_foreach_ID_link(), BLI_assert, BLI_SCOPED_DEFER, 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(), IDHash::data, ID::flag, get_id_shallow_hash(), ID_FLAG_EMBEDDED_DATA, LibraryIDLinkCallbackData::id_pointer, IDWALK_CB_EMBEDDED, IDWALK_CB_EMBEDDED_NOT_OWNING, IDWALK_CB_HASH_IGNORE, IDWALK_CB_LOOPBACK, IDWALK_READONLY, IDWALK_RET_NOP, 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 75 of file id_hash.cc.
References BLI_assert, compute_file_hash_with_file_read(), compute_file_hash_with_memory_map(), and hash.
Referenced by get_source_file_hash().
|
static |
Definition at line 44 of file id_hash.cc.
References read_file().
Referenced by compute_file_hash().
|
static |
Definition at line 53 of file id_hash.cc.
References BLI_mmap_any_io_error(), BLI_mmap_free(), BLI_mmap_get_length(), BLI_mmap_get_pointer(), BLI_mmap_open(), BLI_open(), BLI_SCOPED_DEFER, blender::StringRefNull::c_str(), data, hash, O_BINARY, and size().
Referenced by compute_file_hash().
| 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 233 of file id_hash.cc.
References BLI_assert, compute_deep_hash_recursive(), ID_IS_LINKED, blender::Span< T >::is_empty(), VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::bke::id_hash::DeepHashErrors::missing_files, and blender::bke::id_hash::DeepHashErrors::updated_files.
Referenced by pack_linked_ids().
|
static |
Definition at line 131 of file id_hash.cc.
References BLI_assert, blender::StringRefBase::data(), get_source_file_hash(), ID_IS_LINKED, and blender::StringRefBase::size().
Referenced by compute_deep_hash_recursive().
|
static |
Definition at line 94 of file id_hash.cc.
References VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), BLI_stat(), blender::StringRefNull::c_str(), compute_file_hash(), hash, lock, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), blender::bke::id_hash::DeepHashErrors::missing_files, mutex, and blender::bke::id_hash::DeepHashErrors::updated_files.
Referenced by get_id_shallow_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 257 of file id_hash.cc.
References hash.
|
static |
Definition at line 28 of file id_hash.cc.
References blender::StringRefNull::c_str(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), and size().
Referenced by compute_file_hash_with_file_read().