Blender V4.3
blender::ed::object::bake_simulation Namespace Reference

Classes

struct  BakeGeometryNodesJob
 
struct  NodeBakeRequest
 
struct  PathStringEquality
 
struct  PathStringHash
 
struct  SimulateToFrameJob
 

Typedefs

using PathUsersMap
 

Enumerations

enum class  BakeRequestsMode { Sync , Async }
 

Functions

static bool simulate_to_frame_poll (bContext *C)
 
static void simulate_to_frame_startjob (void *customdata, wmJobWorkerStatus *worker_status)
 
static void simulate_to_frame_endjob (void *customdata)
 
static int simulate_to_frame_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int simulate_to_frame_modal (bContext *C, wmOperator *, const wmEvent *)
 
static bool bake_simulation_poll (bContext *C)
 
static void request_bakes_in_modifier_cache (BakeGeometryNodesJob &job)
 
static void clear_requested_bakes_in_modifier_cache (BakeGeometryNodesJob &job)
 
static void bake_geometry_nodes_startjob (void *customdata, wmJobWorkerStatus *worker_status)
 
static void bake_geometry_nodes_endjob (void *customdata)
 
static void clear_data_block_references (NodesModifierBake &bake)
 
static void reset_old_bake_cache (NodeBakeRequest &request)
 
static void try_delete_bake (bContext *C, Object &object, NodesModifierData &nmd, const int bake_id, ReportList *reports)
 
static int start_bake_job (bContext *C, Vector< NodeBakeRequest > requests, wmOperator *op, const BakeRequestsMode mode)
 
static Vector< NodeBakeRequestcollect_simulations_to_bake (Main &bmain, Scene &scene, const Span< Object * > objects)
 
static Vector< NodeBakeRequestbake_simulation_gather_requests (bContext *C, wmOperator *op)
 
static int bake_simulation_exec (bContext *C, wmOperator *op)
 
static bool bake_directory_has_data (const StringRefNull absolute_bake_dir)
 
static bool may_have_disk_bake (const NodesModifierData &nmd)
 
static void initialize_modifier_bake_directory_if_necessary (bContext *C, Object &object, NodesModifierData &nmd, wmOperator *op)
 
static void bake_simulation_validate_paths (bContext *C, wmOperator *op, const Span< Object * > objects)
 
static PathUsersMap bake_simulation_get_path_users (bContext *C, const Span< Object * > objects)
 
static int bake_simulation_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int bake_simulation_modal (bContext *C, wmOperator *, const wmEvent *)
 
static int delete_baked_simulation_exec (bContext *C, wmOperator *op)
 
static Vector< NodeBakeRequestbake_single_node_gather_bake_request (bContext *C, wmOperator *op)
 
static int bake_single_node_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int bake_single_node_exec (bContext *C, wmOperator *op)
 
static int bake_single_node_modal (bContext *C, wmOperator *, const wmEvent *)
 
static int delete_single_bake_exec (bContext *C, wmOperator *op)
 
static int pack_single_bake_exec (bContext *C, wmOperator *op)
 
static int unpack_single_bake_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int unpack_single_bake_exec (bContext *C, wmOperator *op)
 
void OBJECT_OT_simulation_nodes_cache_calculate_to_frame (wmOperatorType *ot)
 
void OBJECT_OT_simulation_nodes_cache_bake (wmOperatorType *ot)
 
void OBJECT_OT_simulation_nodes_cache_delete (wmOperatorType *ot)
 
static void single_bake_operator_props (wmOperatorType *ot)
 
void OBJECT_OT_geometry_node_bake_single (wmOperatorType *ot)
 
void OBJECT_OT_geometry_node_bake_delete_single (wmOperatorType *ot)
 
void OBJECT_OT_geometry_node_bake_pack_single (wmOperatorType *ot)
 
void OBJECT_OT_geometry_node_bake_unpack_single (wmOperatorType *ot)
 

Typedef Documentation

◆ PathUsersMap

Initial value:
Map<std::string,
int,
default_inline_buffer_capacity(sizeof(std::string)),
PathStringHash,
PathStringEquality>
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
constexpr int64_t default_inline_buffer_capacity(size_t element_size)
PythonProbingStrategy<> DefaultProbingStrategy

Definition at line 773 of file object_bake_simulation.cc.

Enumeration Type Documentation

◆ BakeRequestsMode

Enumerator
Sync 

Bake all requests before returning from the function.

Async 

Start a parallel job and return before the baking is done.

Definition at line 536 of file object_bake_simulation.cc.

Function Documentation

◆ bake_directory_has_data()

static bool blender::ed::object::bake_simulation::bake_directory_has_data ( const StringRefNull absolute_bake_dir)
static

◆ bake_geometry_nodes_endjob()

static void blender::ed::object::bake_simulation::bake_geometry_nodes_endjob ( void * customdata)
static

◆ bake_geometry_nodes_startjob()

static void blender::ed::object::bake_simulation::bake_geometry_nodes_startjob ( void * customdata,
wmJobWorkerStatus * worker_status )
static

Definition at line 250 of file object_bake_simulation.cc.

References blender::ed::object::bake_simulation::BakeGeometryNodesJob::bake_requests, BKE_packedfile_new_from_memory(), BKE_scene_graph_update_for_newframe(), BLI_assert, BLI_file_ensure_parent_dir_exists(), BLI_path_join, BLI_strdup_null(), NodesModifierPackedBake::blob_files, NodesModifierPackedBake::blob_files_num, blender::ed::object::bake_simulation::BakeGeometryNodesJob::bmain, RenderData::cfra, clear_requested_bakes_in_modifier_cache(), data, DEG_id_tag_update(), DEG_time_tag_update(), blender::ed::object::bake_simulation::BakeGeometryNodesJob::depsgraph, wmJobWorkerStatus::do_update, FILE_MAX, blender::bke::bake::FrameCache::frame, blender::bke::bake::frame_to_file_name(), blender::bke::bake::NodeBakeCache::frames, G, blender::bke::bake::ModifierCache::get_node_bake_cache(), ID_RECALC_GEOMETRY, INT32_MAX, INT32_MIN, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), NodesModifierPackedBake::meta_files, NodesModifierPackedBake::meta_files_num, NodesModifierBakeFile::name, NodesModifierBakeFile::packed_file, wmJobWorkerStatus::progress, Scene::r, request_bakes_in_modifier_cache(), NodesModifierData::runtime, blender::ed::object::bake_simulation::BakeGeometryNodesJob::scene, blender::bke::bake::serialize_bake(), blender::bke::bake::FrameCache::state, wmJobWorkerStatus::stop, and RenderData::subframe.

Referenced by start_bake_job().

◆ bake_simulation_exec()

static int blender::ed::object::bake_simulation::bake_simulation_exec ( bContext * C,
wmOperator * op )
static

◆ bake_simulation_gather_requests()

◆ bake_simulation_get_path_users()

◆ bake_simulation_invoke()

◆ bake_simulation_modal()

static int blender::ed::object::bake_simulation::bake_simulation_modal ( bContext * C,
wmOperator * ,
const wmEvent *  )
static

◆ bake_simulation_poll()

static bool blender::ed::object::bake_simulation::bake_simulation_poll ( bContext * C)
static

◆ bake_simulation_validate_paths()

static void blender::ed::object::bake_simulation::bake_simulation_validate_paths ( bContext * C,
wmOperator * op,
const Span< Object * > objects )
static

◆ bake_single_node_exec()

static int blender::ed::object::bake_simulation::bake_single_node_exec ( bContext * C,
wmOperator * op )
static

◆ bake_single_node_gather_bake_request()

static Vector< NodeBakeRequest > blender::ed::object::bake_simulation::bake_single_node_gather_bake_request ( bContext * C,
wmOperator * op )
static

◆ bake_single_node_invoke()

static int blender::ed::object::bake_simulation::bake_single_node_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

◆ bake_single_node_modal()

static int blender::ed::object::bake_simulation::bake_single_node_modal ( bContext * C,
wmOperator * ,
const wmEvent *  )
static

◆ clear_data_block_references()

static void blender::ed::object::bake_simulation::clear_data_block_references ( NodesModifierBake & bake)
static

Definition at line 448 of file object_bake_simulation.cc.

References blender::dna::array::clear().

Referenced by start_bake_job(), and try_delete_bake().

◆ clear_requested_bakes_in_modifier_cache()

static void blender::ed::object::bake_simulation::clear_requested_bakes_in_modifier_cache ( BakeGeometryNodesJob & job)
static

◆ collect_simulations_to_bake()

◆ delete_baked_simulation_exec()

◆ delete_single_bake_exec()

◆ initialize_modifier_bake_directory_if_necessary()

◆ may_have_disk_bake()

static bool blender::ed::object::bake_simulation::may_have_disk_bake ( const NodesModifierData & nmd)
static

◆ OBJECT_OT_geometry_node_bake_delete_single()

void blender::ed::object::bake_simulation::OBJECT_OT_geometry_node_bake_delete_single ( wmOperatorType * ot)

◆ OBJECT_OT_geometry_node_bake_pack_single()

void blender::ed::object::bake_simulation::OBJECT_OT_geometry_node_bake_pack_single ( wmOperatorType * ot)

◆ OBJECT_OT_geometry_node_bake_single()

◆ OBJECT_OT_geometry_node_bake_unpack_single()

◆ OBJECT_OT_simulation_nodes_cache_bake()

◆ OBJECT_OT_simulation_nodes_cache_calculate_to_frame()

◆ OBJECT_OT_simulation_nodes_cache_delete()

◆ pack_single_bake_exec()

◆ request_bakes_in_modifier_cache()

◆ reset_old_bake_cache()

◆ simulate_to_frame_endjob()

static void blender::ed::object::bake_simulation::simulate_to_frame_endjob ( void * customdata)
static

◆ simulate_to_frame_invoke()

◆ simulate_to_frame_modal()

static int blender::ed::object::bake_simulation::simulate_to_frame_modal ( bContext * C,
wmOperator * ,
const wmEvent *  )
static

◆ simulate_to_frame_poll()

static bool blender::ed::object::bake_simulation::simulate_to_frame_poll ( bContext * C)
static

◆ simulate_to_frame_startjob()

◆ single_bake_operator_props()

◆ start_bake_job()

◆ try_delete_bake()

◆ unpack_single_bake_exec()

◆ unpack_single_bake_invoke()