30#include "RNA_prototypes.hh"
46 if (
id ==
nullptr || point_cache ==
nullptr) {
52 "Library override data-blocks only support Disk Cache storage");
71 if (
id ==
nullptr || point_cache ==
nullptr) {
77 C,
"Linked or library override data-blocks do not allow adding or removing caches");
145 worker_status->
stop =
false;
164 cache->
edit =
nullptr;
165 cache->
flag &= ~PTCACHE_BAKED;
169 cache->
flag &= ~PTCACHE_BAKED;
291 ot->
name =
"Bake All Physics";
310 ot->
name =
"Delete All Physics Bakes";
311 ot->
idname =
"PTCACHE_OT_free_bake_all";
312 ot->
description =
"Delete all baked caches of all objects in the current scene";
349 ot->
name =
"Bake Physics";
368 ot->
name =
"Delete Physics Bake";
370 ot->
idname =
"PTCACHE_OT_free_bake";
382 ot->
name =
"Bake from Cache";
384 ot->
idname =
"PTCACHE_OT_bake_from_cache";
437 ot->
name =
"Add New Cache";
451 ot->
name =
"Delete Current Cache";
#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)
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(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_remlink(struct 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.
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void ptcache_bake_cancel(bContext *C, wmOperator *op)
static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *)
static void ptcache_job_free(void *customdata)
static int ptcache_free_bake_all_exec(bContext *C, wmOperator *)
static void ptcache_free_bake(PointCache *cache)
static bool ptcache_add_remove_poll(bContext *C)
static int ptcache_job_break(void *customdata)
static int ptcache_free_bake_exec(bContext *C, wmOperator *)
static bool ptcache_bake_all_poll(bContext *C)
static int ptcache_bake_exec(bContext *C, wmOperator *op)
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 int ptcache_add_new_exec(bContext *C, wmOperator *)
void PTCACHE_OT_add(wmOperatorType *ot)
static void ptcache_job_endjob(void *customdata)
static int 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 int ptcache_bake_modal(bContext *C, wmOperator *op, const wmEvent *)
static void ptcache_job_update(void *customdata, float progress, int *cancel)
static void ptcache_job_startjob(void *customdata, wmJobWorkerStatus *worker_status)
static int ptcache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
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
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct wmOperatorType * type
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_set_locked_interface(wmWindowManager *wm, bool lock)
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))