Blender
V5.3
source
blender
blenkernel
BKE_bake_values.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#pragma once
10
11
#include "
BKE_attribute_enums.hh
"
12
#include "
BKE_bake_data_block_map.hh
"
13
#include "
BKE_node_socket_value.hh
"
14
15
#include "
BLI_compute_context.hh
"
16
#include "
BLI_map.hh
"
17
18
#include "
DNA_node_types.h
"
19
20
namespace
blender::bke::bake
{
21
29
class
BakeValues
{
30
public
:
31
struct
Item
{
32
SocketValueVariant
value
;
33
std::optional<std::string>
name
;
34
};
35
36
private
:
37
Map<int, Item>
values_by_id_;
38
39
public
:
40
struct
InputValue
{
41
int
id
;
42
std::string
name
;
43
SocketValueVariant
value
;
48
std::optional<AttrDomain>
field_domain
;
49
};
50
struct
OutputKey
{
51
int
id
;
52
eNodeSocketDatatype
type
;
53
};
54
55
BakeValues
() =
default
;
56
explicit
BakeValues
(
Map<int, Item>
values_by_id
) : values_by_id_(std::move(
values_by_id
)) {}
57
65
static
BakeValues
from_runtime_values
(
Vector<InputValue>
runtime_values,
66
BakeDataBlockMap
*data_block_map,
67
bool
is_for_cache =
true
);
68
73
Vector<SocketValueVariant>
to_runtime_values
(
const
Span<OutputKey>
keys,
74
const
ComputeContext
&compute_context,
75
BakeDataBlockMap
*data_block_map)
const
;
76
77
bool
is_empty
()
const
78
{
79
return
values_by_id_.is_empty();
80
}
81
82
void
clear
()
83
{
84
values_by_id_.clear();
85
}
86
87
const
Map<int, Item>
&
values_by_id
()
const
88
{
89
return
values_by_id_;
90
}
91
};
92
93
}
// namespace blender::bke::bake
BKE_attribute_enums.hh
BKE_bake_data_block_map.hh
BKE_node_socket_value.hh
BLI_compute_context.hh
BLI_map.hh
DNA_node_types.h
blender::ComputeContext
Definition
BLI_compute_context.hh:80
blender::Map
Definition
BLI_map.hh:129
blender::Span
Definition
BLI_span.hh:74
blender::Vector
Definition
BLI_vector.hh:76
blender::bke::SocketValueVariant
Definition
BKE_node_socket_value.hh:83
blender::bke::bake::BakeValues
Definition
BKE_bake_values.hh:29
blender::bke::bake::BakeValues::BakeValues
BakeValues()=default
blender::bke::bake::BakeValues::from_runtime_values
static BakeValues from_runtime_values(Vector< InputValue > runtime_values, BakeDataBlockMap *data_block_map, bool is_for_cache=true)
Definition
bake_values.cc:645
blender::bke::bake::BakeValues::values_by_id
const Map< int, Item > & values_by_id() const
Definition
BKE_bake_values.hh:87
blender::bke::bake::BakeValues::BakeValues
BakeValues(Map< int, Item > values_by_id)
Definition
BKE_bake_values.hh:56
blender::bke::bake::BakeValues::is_empty
bool is_empty() const
Definition
BKE_bake_values.hh:77
blender::bke::bake::BakeValues::clear
void clear()
Definition
BKE_bake_values.hh:82
blender::bke::bake::BakeValues::to_runtime_values
Vector< SocketValueVariant > to_runtime_values(const Span< OutputKey > keys, const ComputeContext &compute_context, BakeDataBlockMap *data_block_map) const
Definition
bake_values.cc:692
blender::bke::bake
Definition
BKE_bake_attribute_field.hh:13
blender::eNodeSocketDatatype
eNodeSocketDatatype
Definition
DNA_node_types.h:88
blender::bke::bake::BakeDataBlockMap
Definition
BKE_bake_data_block_map.hh:21
blender::bke::bake::BakeValues::InputValue
Definition
BKE_bake_values.hh:40
blender::bke::bake::BakeValues::InputValue::id
int id
Definition
BKE_bake_values.hh:41
blender::bke::bake::BakeValues::InputValue::field_domain
std::optional< AttrDomain > field_domain
Definition
BKE_bake_values.hh:48
blender::bke::bake::BakeValues::InputValue::name
std::string name
Definition
BKE_bake_values.hh:42
blender::bke::bake::BakeValues::InputValue::value
SocketValueVariant value
Definition
BKE_bake_values.hh:43
blender::bke::bake::BakeValues::Item
Definition
BKE_bake_values.hh:31
blender::bke::bake::BakeValues::Item::name
std::optional< std::string > name
Definition
BKE_bake_values.hh:33
blender::bke::bake::BakeValues::Item::value
SocketValueVariant value
Definition
BKE_bake_values.hh:32
blender::bke::bake::BakeValues::OutputKey
Definition
BKE_bake_values.hh:50
blender::bke::bake::BakeValues::OutputKey::type
eNodeSocketDatatype type
Definition
BKE_bake_values.hh:52
blender::bke::bake::BakeValues::OutputKey::id
int id
Definition
BKE_bake_values.hh:51
Generated on
for Blender by
doxygen
1.18.0