Blender V5.3
blender::bke::bake::BakeValues Class Reference

#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)

Detailed Description

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.

Constructor & Destructor Documentation

◆ BakeValues() [1/2]

blender::bke::bake::BakeValues::BakeValues ( )
default

◆ BakeValues() [2/2]

blender::bke::bake::BakeValues::BakeValues ( Map< int, Item > values_by_id)
inlineexplicit

Definition at line 56 of file BKE_bake_values.hh.

References values_by_id().

Member Function Documentation

◆ clear()

void blender::bke::bake::BakeValues::clear ( )
inline

Definition at line 82 of file BKE_bake_values.hh.

◆ from_runtime_values()

BakeValues blender::bke::bake::BakeValues::from_runtime_values ( Vector< InputValue > runtime_values,
BakeDataBlockMap * data_block_map,
bool is_for_cache = true )
static

Creates new bake values from the given values. This makes sure that the values follow the restrictions for bake data.

Parameters
is_for_cacheIf 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().

◆ is_empty()

bool blender::bke::bake::BakeValues::is_empty ( ) const
inline

Definition at line 77 of file BKE_bake_values.hh.

Referenced by blender::ensure_bake_loaded().

◆ to_runtime_values()

◆ values_by_id()

const Map< int, Item > & blender::bke::bake::BakeValues::values_by_id ( ) const
inline

Definition at line 87 of file BKE_bake_values.hh.

Referenced by BakeValues(), and blender::bke::bake::serialize_bake().


The documentation for this class was generated from the following files: