33#include "RNA_prototypes.hh"
46 ID *
id =
ptr.owner_id;
49 if (
id ==
nullptr || point_cache ==
nullptr) {
55 "Library override data-blocks only support Disk Cache storage");
71 ID *
id =
ptr.owner_id;
74 if (
id ==
nullptr || point_cache ==
nullptr) {
80 C,
"Linked or library override data-blocks do not allow adding or removing caches");
148 worker_status->
stop =
false;
167 cache->
edit =
nullptr;
192 ID *
id =
ptr.owner_id;
225 "Baking point cache...",
292 ot->name =
"Bake All Physics";
293 ot->description =
"Bake all physics";
294 ot->idname =
"PTCACHE_OT_bake_all";
311 ot->name =
"Delete All Physics Bakes";
312 ot->idname =
"PTCACHE_OT_free_bake_all";
313 ot->description =
"Delete all baked caches of all objects in the current scene";
350 ot->name =
"Bake Physics";
351 ot->description =
"Bake physics";
352 ot->idname =
"PTCACHE_OT_bake";
369 ot->name =
"Delete Physics Bake";
370 ot->description =
"Delete physics bake";
371 ot->idname =
"PTCACHE_OT_free_bake";
383 ot->name =
"Bake from Cache";
384 ot->description =
"Bake from cache";
385 ot->idname =
"PTCACHE_OT_bake_from_cache";
438 ot->name =
"Add New Cache";
439 ot->description =
"Add new cache";
440 ot->idname =
"PTCACHE_OT_add";
452 ot->name =
"Delete Current Cache";
453 ot->description =
"Delete current cache";
454 ot->idname =
"PTCACHE_OT_remove";
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
constexpr int MAX_DUPLI_RECUR
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis)
void BKE_ptcache_bake(struct PTCacheBaker *baker)
struct PointCache * BKE_ptcache_add(struct ListBase *ptcaches)
PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache)
void BKE_ptcache_free(struct PointCache *cache)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void DEG_id_tag_update(ID *id, unsigned int flags)
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_EDITABLE(_id)
void PE_free_ptcache_edit(PTCacheEdit *edit)
Read Guarded memory(de)allocation.
bool all(VecOp< bool, D >) RET
void * MEM_mallocN(size_t len, const char *str)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
static void ptcache_bake_cancel(bContext *C, wmOperator *op)
static void ptcache_job_free(void *customdata)
static wmOperatorStatus ptcache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void ptcache_free_bake(PointCache *cache)
static bool ptcache_add_remove_poll(bContext *C)
static wmOperatorStatus ptcache_bake_from_cache_exec(bContext *C, wmOperator *)
static int ptcache_job_break(void *customdata)
static wmOperatorStatus ptcache_add_new_exec(bContext *C, wmOperator *)
static bool ptcache_bake_all_poll(bContext *C)
static wmOperatorStatus ptcache_bake_modal(bContext *C, wmOperator *op, const wmEvent *)
void PTCACHE_OT_bake(wmOperatorType *ot)
void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
static PTCacheBaker * ptcache_baker_create(bContext *C, wmOperator *op, bool all)
static bool ptcache_poll(bContext *C)
static wmOperatorStatus ptcache_free_bake_exec(bContext *C, wmOperator *)
void PTCACHE_OT_add(wmOperatorType *ot)
static wmOperatorStatus ptcache_free_bake_all_exec(bContext *C, wmOperator *)
static wmOperatorStatus ptcache_bake_exec(bContext *C, wmOperator *op)
static void ptcache_job_endjob(void *customdata)
static wmOperatorStatus ptcache_remove_exec(bContext *C, wmOperator *)
void PTCACHE_OT_remove(wmOperatorType *ot)
void PTCACHE_OT_bake_from_cache(wmOperatorType *ot)
void PTCACHE_OT_bake_all(wmOperatorType *ot)
void PTCACHE_OT_free_bake(wmOperatorType *ot)
static void ptcache_job_update(void *customdata, float progress, int *cancel)
static void ptcache_job_startjob(void *customdata, wmJobWorkerStatus *worker_status)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void(* update_progress)(void *data, float progress, int *cancel)
struct Depsgraph * depsgraph
struct ViewLayer * view_layer
struct PointCache ** cache_ptr
struct ListBase * ptcaches
unsigned int default_step
struct PointCache * cache
struct PTCacheEdit * edit
struct wmOperatorType * type
void WM_locked_interface_set(wmWindowManager *wm, bool lock)
void WM_main_add_notifier(uint type, void *reference)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
bool WM_jobs_test(const wmWindowManager *wm, const void *owner, int job_type)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))