Blender V5.0
blender::ed::object::bake_simulation Namespace Reference

Classes

struct  SimulateToFrameJob
struct  NodeBakeRequest
struct  BakeGeometryNodesJob
struct  PathStringHash
struct  PathStringEquality

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 wmOperatorStatus simulate_to_frame_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus simulate_to_frame_modal (bContext *C, wmOperator *, const wmEvent *)
static bool bake_simulation_poll (bContext *C)
static void try_delete_bake (Main *bmain, Object &object, NodesModifierData &nmd, const int bake_id, ReportList *reports)
static void reset_old_bake_cache (NodeBakeRequest &request)
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 wmOperatorStatus 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 wmOperatorStatus 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 wmOperatorStatus bake_simulation_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus bake_simulation_modal (bContext *C, wmOperator *, const wmEvent *)
static wmOperatorStatus delete_baked_simulation_exec (bContext *C, wmOperator *op)
static Vector< NodeBakeRequestbake_single_node_gather_bake_request (bContext *C, wmOperator *op)
static wmOperatorStatus bake_single_node_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus bake_single_node_exec (bContext *C, wmOperator *op)
static wmOperatorStatus bake_single_node_modal (bContext *C, wmOperator *, const wmEvent *)
static wmOperatorStatus delete_single_bake_exec (bContext *C, wmOperator *op)
static wmOperatorStatus pack_single_bake_exec (bContext *C, wmOperator *op)
static wmOperatorStatus unpack_single_bake_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus 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

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 555 of file object_bake_simulation.cc.

Function Documentation

◆ bake_directory_has_data()

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

◆ bake_geometry_nodes_endjob()

◆ bake_geometry_nodes_startjob()

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

Definition at line 258 of file object_bake_simulation.cc.

References blender::ed::object::bake_simulation::NodeBakeRequest::bake_id, blender::ed::object::bake_simulation::BakeGeometryNodesJob::bake_requests, blender::bke::bake::Baked, 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::NodeBakeRequest::blob_sharing, 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, blender::ed::object::bake_simulation::BakeGeometryNodesJob::error_message, FILE_MAX, blender::bke::bake::FrameCache::frame, blender::SubFrame::frame(), blender::ed::object::bake_simulation::NodeBakeRequest::frame_end, blender::ed::object::bake_simulation::NodeBakeRequest::frame_start, blender::bke::bake::frame_to_file_name(), blender::bke::bake::NodeBakeCache::frames, G, GEO_NODE_SIMULATION_OUTPUT, blender::bke::bake::ModifierCache::get_node_bake_cache(), blender::bke::bake::MemoryBlobWriter::get_stream_by_name(), i, Object::id, 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(), MEM_calloc_arrayN(), MEM_callocN(), NodesModifierPackedBake::meta_files, NodesModifierPackedBake::meta_files_num, name, NodesModifierBakeFile::name, blender::ed::object::bake_simulation::NodeBakeRequest::nmd, blender::ed::object::bake_simulation::NodeBakeRequest::node_type, num, blender::ed::object::bake_simulation::NodeBakeRequest::object, NodesModifierBakeFile::packed_file, PACKED_FILE_MAX_SIZE, blender::ed::object::bake_simulation::NodeBakeRequest::path, 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, blender::SubFrame::subframe(), RenderData::subframe, TIP_, and blender::bke::bake::BlobWriter::written_size().

Referenced by start_bake_job().

◆ bake_simulation_exec()

wmOperatorStatus 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()

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

◆ bake_simulation_poll()

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

◆ bake_simulation_validate_paths()

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

◆ bake_single_node_exec()

◆ bake_single_node_gather_bake_request()

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

◆ bake_single_node_invoke()

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

◆ bake_single_node_modal()

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

◆ clear_data_block_references()

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

Definition at line 468 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()

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

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

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

◆ OBJECT_OT_geometry_node_bake_unpack_single()

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

◆ OBJECT_OT_simulation_nodes_cache_bake()

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

◆ OBJECT_OT_simulation_nodes_cache_calculate_to_frame()

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

◆ OBJECT_OT_simulation_nodes_cache_delete()

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

◆ pack_single_bake_exec()

◆ request_bakes_in_modifier_cache()

◆ reset_old_bake_cache()

◆ simulate_to_frame_endjob()

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

◆ simulate_to_frame_invoke()

◆ simulate_to_frame_modal()

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

◆ simulate_to_frame_poll()

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