Blender
V5.0
source
blender
draw
intern
draw_attributes.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2022 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11
#pragma once
12
13
#include <string>
14
15
#include "
DNA_customdata_types.h
"
16
17
#include "
BLI_string_ref.hh
"
18
#include "
BLI_sys_types.h
"
19
20
#include "
BLI_vector_set.hh
"
21
22
namespace
blender::bke
{
23
enum class
AttrDomain
:
int8_t
;
24
}
25
26
namespace
blender::draw
{
27
28
struct
DRW_MeshCDMask
{
29
uint32_t
uv
: 8;
30
uint32_t
tan
: 8;
31
uint32_t
orco
: 1;
32
uint32_t
tan_orco
: 1;
33
uint32_t
sculpt_overlays
: 1;
37
uint32_t
edit_uv
: 1;
38
};
39
40
/* Keep `DRW_MeshCDMask` struct within a `uint32_t`.
41
* bit-wise and atomic operations are used to compare and update the struct.
42
* See `mesh_cd_layers_type_*` functions. */
43
static_assert
(
sizeof
(
DRW_MeshCDMask
) <=
sizeof
(uint32_t),
"DRW_MeshCDMask exceeds 32 bits"
);
44
45
void
drw_attributes_merge
(
VectorSet<std::string>
*dst,
const
VectorSet<std::string>
*src);
46
47
/* Return true if all requests in b are in a. */
48
bool
drw_attributes_overlap
(
const
VectorSet<std::string>
*a,
const
VectorSet<std::string>
*
b
);
49
50
void
drw_attributes_add_request
(
VectorSet<std::string>
*attrs,
StringRef
name
);
51
52
bool
drw_custom_data_match_attribute
(
const
CustomData
&custom_data,
53
StringRef
name
,
54
int
*r_layer_index,
55
eCustomDataType
*r_type);
56
57
}
// namespace blender::draw
BLI_string_ref.hh
BLI_sys_types.h
BLI_vector_set.hh
DNA_customdata_types.h
eCustomDataType
eCustomDataType
Definition
DNA_customdata_types.h:86
blender::StringRef
Definition
BLI_string_ref.hh:150
blender::VectorSet
Definition
BLI_vector_set.hh:92
b
b
Definition
compositor_morphological_distance_infos.hh:24
blender::bke
Definition
AS_asset_library.hh:27
blender::bke::AttrDomain
AttrDomain
Definition
BKE_attribute.hh:63
blender::draw::gpencil::int8_t
signed char int8_t
Definition
gpencil_cache_utils.cc:76
blender::draw
Definition
DRW_engine.hh:179
blender::draw::drw_attributes_add_request
void drw_attributes_add_request(VectorSet< std::string > *attrs, const StringRef name)
Definition
draw_attributes.cc:29
blender::draw::drw_attributes_overlap
bool drw_attributes_overlap(const VectorSet< std::string > *a, const VectorSet< std::string > *b)
Definition
draw_attributes.cc:18
blender::draw::drw_attributes_merge
void drw_attributes_merge(VectorSet< std::string > *dst, const VectorSet< std::string > *src)
Definition
draw_attributes.cc:13
blender::draw::drw_custom_data_match_attribute
bool drw_custom_data_match_attribute(const CustomData &custom_data, const StringRef name, int *r_layer_index, eCustomDataType *r_type)
Definition
draw_attributes.cc:37
name
const char * name
Definition
python_compat.hh:32
CustomData
Definition
DNA_customdata_types.h:67
blender::draw::DRW_MeshCDMask
Definition
draw_attributes.hh:28
blender::draw::DRW_MeshCDMask::sculpt_overlays
uint32_t sculpt_overlays
Definition
draw_attributes.hh:33
blender::draw::DRW_MeshCDMask::tan_orco
uint32_t tan_orco
Definition
draw_attributes.hh:32
blender::draw::DRW_MeshCDMask::edit_uv
uint32_t edit_uv
Definition
draw_attributes.hh:37
blender::draw::DRW_MeshCDMask::uv
uint32_t uv
Definition
draw_attributes.hh:29
blender::draw::DRW_MeshCDMask::tan
uint32_t tan
Definition
draw_attributes.hh:30
blender::draw::DRW_MeshCDMask::orco
uint32_t orco
Definition
draw_attributes.hh:31
Generated on
for Blender by
doxygen
1.16.1