Blender
V4.3
source
blender
blenkernel
BKE_anonymous_attribute_id.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include <atomic>
8
9
#include "
BLI_implicit_sharing_ptr.hh
"
10
#include "
BLI_set.hh
"
11
#include "
BLI_string_ref.hh
"
12
13
#include "
BKE_attribute_filter.hh
"
14
15
namespace
blender::bke
{
16
20
class
AnonymousAttributeSet
{
21
public
:
27
std::shared_ptr<Set<std::string>>
names
;
28
};
29
37
inline
bool
attribute_name_is_anonymous
(
const
StringRef
name)
38
{
39
return
name.startswith(
".a_"
);
40
}
41
42
class
ProcessAllAttributeExceptAnonymous
:
public
AttributeFilter
{
43
public
:
44
Result
filter
(
const
StringRef
name)
const override
45
{
46
if
(
attribute_name_is_anonymous
(name)) {
47
return
AttributeFilter::Result::AllowSkip
;
48
}
49
return
AttributeFilter::Result::Process
;
50
}
51
};
52
53
}
// namespace blender::bke
BKE_attribute_filter.hh
BLI_implicit_sharing_ptr.hh
BLI_set.hh
BLI_string_ref.hh
blender::StringRef
Definition
BLI_string_ref.hh:128
blender::bke::AnonymousAttributeSet
Definition
BKE_anonymous_attribute_id.hh:20
blender::bke::AnonymousAttributeSet::names
std::shared_ptr< Set< std::string > > names
Definition
BKE_anonymous_attribute_id.hh:27
blender::bke::ProcessAllAttributeExceptAnonymous
Definition
BKE_anonymous_attribute_id.hh:42
blender::bke::ProcessAllAttributeExceptAnonymous::filter
Result filter(const StringRef name) const override
Definition
BKE_anonymous_attribute_id.hh:44
blender::bke
Definition
AS_asset_library.hh:26
blender::bke::attribute_name_is_anonymous
bool attribute_name_is_anonymous(const StringRef name)
Definition
BKE_anonymous_attribute_id.hh:37
blender::bke::AttributeFilter
Definition
BKE_attribute_filter.hh:23
blender::bke::AttributeFilter::Result
Result
Definition
BKE_attribute_filter.hh:25
blender::bke::AttributeFilter::Result::Process
@ Process
blender::bke::AttributeFilter::Result::AllowSkip
@ AllowSkip
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0