Blender
V5.0
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
8
9
#include <fmt/format.h>
10
#include <sstream>
11
#include <xxhash.h>
12
13
namespace
blender::bke
{
14
15
template
<
typename
... Args>
inline
std::string
hash_to_anonymous_attribute_name
(Args &&...args)
16
{
17
std::stringstream ss;
18
((ss << args), ...);
19
const
std::string long_name = ss.str();
20
const
XXH128_hash_t
hash
= XXH3_128bits(long_name.c_str(), long_name.size());
21
return
fmt::format(
".a_{:x}{:x}"
,
hash
.low64,
hash
.high64);
22
}
23
24
}
// namespace blender::bke
blender::bke
Definition
AS_asset_library.hh:27
blender::bke::hash_to_anonymous_attribute_name
std::string hash_to_anonymous_attribute_name(Args &&...args)
Definition
BKE_anonymous_attribute_make.hh:15
hash
#define hash
Definition
noise_c.cc:154
Generated on
for Blender by
doxygen
1.16.1