Blender
V4.3
source
blender
blenkernel
BKE_anonymous_attribute_make.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include <fmt/format.h>
6
#include <sstream>
7
#include <xxhash.h>
8
9
namespace
blender::bke
{
10
11
template
<
typename
... Args>
inline
std::string
hash_to_anonymous_attribute_name
(Args &&...args)
12
{
13
std::stringstream ss;
14
((ss << args), ...);
15
const
std::string long_name = ss.str();
16
const
XXH128_hash_t
hash
= XXH3_128bits(long_name.c_str(), long_name.size());
17
return
fmt::format(
".a_{:x}{:x}"
,
hash
.low64,
hash
.high64);
18
}
19
20
}
// namespace blender::bke
blender::bke
Definition
AS_asset_library.hh:26
blender::bke::hash_to_anonymous_attribute_name
std::string hash_to_anonymous_attribute_name(Args &&...args)
Definition
BKE_anonymous_attribute_make.hh:11
hash
#define hash
Definition
noise.c:154
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0