Blender
V4.3
source
blender
blenkernel
BKE_attribute_filter.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 "
BLI_function_ref.hh
"
8
#include "
BLI_string_ref.hh
"
9
10
namespace
blender::bke
{
11
23
struct
AttributeFilter
{
24
public
:
25
enum class
Result
{
27
AllowSkip
,
29
Process
,
30
};
31
32
virtual
~AttributeFilter
() =
default
;
33
38
virtual
Result
filter
(
const
StringRef
/*name*/
)
const
39
{
40
return
Result::Process
;
41
}
42
46
bool
allow_skip
(
const
StringRef
name)
const
47
{
48
return
this->
filter
(name) ==
Result::AllowSkip
;
49
}
50
51
static
const
AttributeFilter
&
default_filter
()
52
{
53
static
AttributeFilter
filter
;
54
return
filter
;
55
}
56
};
57
58
}
// namespace blender::bke
BLI_function_ref.hh
BLI_string_ref.hh
blender::StringRef
Definition
BLI_string_ref.hh:128
blender::bke
Definition
AS_asset_library.hh:26
blender::bke::AttributeFilter
Definition
BKE_attribute_filter.hh:23
blender::bke::AttributeFilter::filter
virtual Result filter(const StringRef) const
Definition
BKE_attribute_filter.hh:38
blender::bke::AttributeFilter::default_filter
static const AttributeFilter & default_filter()
Definition
BKE_attribute_filter.hh:51
blender::bke::AttributeFilter::Result
Result
Definition
BKE_attribute_filter.hh:25
blender::bke::AttributeFilter::Result::Process
@ Process
blender::bke::AttributeFilter::Result::AllowSkip
@ AllowSkip
blender::bke::AttributeFilter::allow_skip
bool allow_skip(const StringRef name) const
Definition
BKE_attribute_filter.hh:46
blender::bke::AttributeFilter::~AttributeFilter
virtual ~AttributeFilter()=default
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0