|
Blender V5.3
|
#include <BKE_bake_values.hh>
Classes | |
| struct | Item |
| struct | InputValue |
| struct | OutputKey |
Public Member Functions | |
| BakeValues ()=default | |
| BakeValues (Map< int, Item > values_by_id) | |
| Vector< SocketValueVariant > | to_runtime_values (const Span< OutputKey > keys, const ComputeContext &compute_context, BakeDataBlockMap *data_block_map) const |
| bool | is_empty () const |
| void | clear () |
| const Map< int, Item > & | values_by_id () const |
Static Public Member Functions | |
| static BakeValues | from_runtime_values (Vector< InputValue > runtime_values, BakeDataBlockMap *data_block_map, bool is_for_cache=true) |
Intermediate storage for values that are read from a bake or are about to written to a bake. Values stored in this intermediate form have some constraints. For example, they can't store arbitrary fields (only attribute fields currently since those can be serialized). Additionally, data-block references to e.g. materials are weak and will only be restored in to_runtime_values.
Definition at line 29 of file BKE_bake_values.hh.
|
default |
Referenced by from_runtime_values(), and blender::bke::bake::tests::TEST_F().
Definition at line 56 of file BKE_bake_values.hh.
References values_by_id().
|
inline |
Definition at line 82 of file BKE_bake_values.hh.
|
static |
Creates new bake values from the given values. This makes sure that the values follow the restrictions for bake data.
| is_for_cache | If false, some run-time data can be kept on the data which would otherwise need to be removed because it could cause dangling pointers. |
Definition at line 645 of file bake_values.cc.
References BakeValues(), blender::bke::bake::RuntimeToBakeValue::convert(), and blender::bke::bake::BakeValues::InputValue::id.
Referenced by blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::get_bake_values_from_inputs(), blender::nodes::node_geo_simulation_cc::sim_input_node::LazyFunctionForSimulationInputNode::get_bake_values_from_inputs(), and blender::nodes::node_geo_simulation_cc::sim_output_node::LazyFunctionForSimulationOutputNode::get_bake_values_from_inputs().
|
inline |
Definition at line 77 of file BKE_bake_values.hh.
Referenced by blender::ensure_bake_loaded().
| Vector< SocketValueVariant > blender::bke::bake::BakeValues::to_runtime_values | ( | const Span< OutputKey > | keys, |
| const ComputeContext & | compute_context, | ||
| BakeDataBlockMap * | data_block_map ) const |
Create fully valid run-time data again from the bake data. This also restores potential data-block references.
Definition at line 692 of file bake_values.cc.
References blender::bke::bake::BakeToRuntimeValue::bake_to_runtime(), blender::bke::bNodeSocketType::base_cpp_type, blender::bke::bNodeSocketType::geometry_nodes_default_value, blender::ComputeContext::hash(), blender::bke::bake::BakeValues::OutputKey::id, blender::Span< T >::index_range(), blender::bke::bake::BakeValues::Item::name, blender::bke::node_socket_type_find_static(), blender::bke::bake::BakeToRuntimeValue::scan(), blender::Span< T >::size(), blender::bke::bake::BakeValues::OutputKey::type, blender::bke::bake::BakeValues::Item::value, and blender::bke::bake::value_variant_valid_for_socket().
Referenced by blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::bake_to_output_values().
Definition at line 87 of file BKE_bake_values.hh.
Referenced by BakeValues(), and blender::bke::bake::serialize_bake().