Blender V5.3
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< NodeBakeRequest > collect_simulations_to_bake (Main &bmain, Scene &scene, const Span< Object * > objects)
static Vector< NodeBakeRequest > bake_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< NodeBakeRequest > bake_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 563 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 266 of file object_bake_simulation.cc.

References bake_geometry_nodes_startjob(), blender::ed::object::bake_simulation::NodeBakeRequest::bake_id, blender::ed::object::bake_simulation::BakeGeometryNodesJob::bake_requests, blender::BKE_packedfile_new_from_memory(), blender::BKE_scene_graph_update_for_newframe(), blender::BLI_assert(), blender::BLI_file_ensure_parent_dir_exists(), BLI_path_join, blender::BLI_strdup_null(), blender::NodesModifierPackedBake::blob_files, blender::NodesModifierPackedBake::blob_files_num, blender::ed::object::bake_simulation::NodeBakeRequest::blob_sharing, blender::ed::object::bake_simulation::BakeGeometryNodesJob::bmain, blender::NodesModifierRuntime::cache, blender::RenderData::cfra, clear_requested_bakes_in_modifier_cache(), blender::data, blender::DEG_id_tag_update(), blender::DEG_time_tag_update(), blender::ed::object::bake_simulation::BakeGeometryNodesJob::depsgraph, blender::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, blender::G, GEO_NODE_SIMULATION_OUTPUT, blender::bke::bake::ModifierCache::get_node_bake_cache(), blender::bke::bake::MemoryBlobWriter::get_stream_by_name(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::IndexRange::IndexRange(), 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(), blender::NodesModifierPackedBake::meta_files, blender::NodesModifierPackedBake::meta_files_num, blender::NodesModifierBakeFile::name, blender::ed::object::bake_simulation::NodeBakeRequest::nmd, blender::ed::object::bake_simulation::NodeBakeRequest::node_type, blender::num, blender::ed::object::bake_simulation::NodeBakeRequest::object, blender::NodesModifierBakeFile::packed_file, blender::PACKED_FILE_MAX_SIZE, blender::ed::object::bake_simulation::NodeBakeRequest::path, blender::wmJobWorkerStatus::progress, blender::Scene::r, request_bakes_in_modifier_cache(), blender::NodesModifierData::runtime, blender::ed::object::bake_simulation::BakeGeometryNodesJob::scene, blender::bke::bake::serialize_bake(), blender::wmJobWorkerStatus::stop, blender::RenderData::subframe, blender::SubFrame::subframe(), TIP_, blender::bke::bake::FrameCache::values, and blender::bke::bake::BlobWriter::written_size().

Referenced by bake_geometry_nodes_startjob(), and 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()

◆ bake_simulation_poll()

◆ 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

Definition at line 964 of file object_bake_simulation.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::ed::object::bake_simulation::NodeBakeRequest::bake_id, bake_single_node_gather_bake_request(), blender::BKE_modifier_is_enabled(), blender::BKE_modifiers_findby_name(), blender::BKE_report(), blender::ed::object::bake_simulation::NodeBakeRequest::blob_sharing, C, blender::RenderData::cfra, blender::CTX_data_main(), blender::CTX_data_scene(), ELEM, blender::eModifierMode_Realtime, blender::ed::object::bake_simulation::NodeBakeRequest::frame_end, blender::ed::object::bake_simulation::NodeBakeRequest::frame_start, GEO_NODE_BAKE, GEO_NODE_SIMULATION_OUTPUT, blender::bke::bake::get_node_bake_frame_range(), blender::bke::bake::get_node_bake_path(), blender::bke::bake::get_node_bake_target(), ID_MISSING, blender::ID_OB, initialize_modifier_bake_directory_if_necessary(), blender::ed::object::bake_simulation::NodeBakeRequest::nmd, node, blender::NodesModifierData::node_group, blender::ed::object::bake_simulation::NodeBakeRequest::node_type, blender::NODES_MODIFIER_BAKE_MODE_STILL, blender::NODES_MODIFIER_BAKE_TARGET_DISK, blender::ed::object::bake_simulation::NodeBakeRequest::object, blender::ed::object::bake_simulation::NodeBakeRequest::path, blender::wmOperator::ptr, blender::Scene::r, blender::wmOperator::reports, blender::RNA_int_get(), blender::RNA_string_get(), blender::RPT_ERROR, blender::RPT_INFO, try_delete_bake(), and blender::WM_operator_properties_id_lookup_from_name_or_session_uid().

Referenced by bake_single_node_exec(), bake_single_node_gather_bake_request(), and bake_single_node_invoke().

◆ bake_single_node_invoke()

◆ bake_single_node_modal()

◆ clear_data_block_references()

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

◆ clear_requested_bakes_in_modifier_cache()

◆ collect_simulations_to_bake()

◆ delete_baked_simulation_exec()

◆ delete_single_bake_exec()

◆ initialize_modifier_bake_directory_if_necessary()

◆ may_have_disk_bake()

◆ OBJECT_OT_geometry_node_bake_delete_single()

◆ OBJECT_OT_geometry_node_bake_pack_single()

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

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

◆ simulate_to_frame_invoke()

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

◆ simulate_to_frame_modal()

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

wmOperatorStatus blender::ed::object::bake_simulation::start_bake_job ( bContext * C,
Vector< NodeBakeRequest > requests,
wmOperator * op,
const BakeRequestsMode mode )
static

◆ try_delete_bake()

◆ unpack_single_bake_exec()

◆ unpack_single_bake_invoke()