32 #include "RNA_prototypes.h"
48 if (
id ==
NULL || point_cache ==
NULL) {
54 "Library override data-blocks only support Disk Cache storage");
73 if (
id ==
NULL || point_cache ==
NULL) {
79 C,
"Linked or library override data-blocks do not allow adding or removing caches");
273 for (pid = pidlist.
first; pid; pid = pid->
next) {
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";
404 cache_new->
step = pid.default_step;
405 *(pid.cache_ptr) = cache_new;
423 if (pid.cache && pid.ptcaches->first != pid.ptcaches->last) {
426 *(pid.cache_ptr) = pid.ptcaches->first;
437 ot->
name =
"Add New Cache";
451 ot->
name =
"Delete Current Cache";
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(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)
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(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_LINKED(_id)
void PE_free_ptcache_edit(struct PTCacheEdit *edit)
Read Guarded memory(de)allocation.
__forceinline bool all(const avxb &b)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void ptcache_bake_cancel(bContext *C, wmOperator *op)
struct PointCacheJob PointCacheJob
static void ptcache_job_free(void *customdata)
static int ptcache_free_bake_exec(bContext *C, wmOperator *UNUSED(op))
static int ptcache_add_new_exec(bContext *C, wmOperator *UNUSED(op))
static int ptcache_bake_modal(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void ptcache_free_bake(PointCache *cache)
static bool ptcache_add_remove_poll(bContext *C)
static int ptcache_job_break(void *customdata)
static bool ptcache_bake_all_poll(bContext *C)
static int ptcache_bake_exec(bContext *C, wmOperator *op)
static int ptcache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void PTCACHE_OT_bake(wmOperatorType *ot)
void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
static int ptcache_remove_exec(bContext *C, wmOperator *UNUSED(op))
static bool ptcache_poll(bContext *C)
void PTCACHE_OT_add(wmOperatorType *ot)
static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
static PTCacheBaker * ptcache_baker_create(bContext *C, wmOperator *op, bool all)
static void ptcache_job_endjob(void *customdata)
static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *UNUSED(op))
void PTCACHE_OT_remove(wmOperatorType *ot)
void PTCACHE_OT_bake_from_cache(wmOperatorType *ot)
void PTCACHE_OT_bake_all(wmOperatorType *ot)
static void ptcache_job_startjob(void *customdata, short *stop, short *do_update, float *progress)
void PTCACHE_OT_free_bake(wmOperatorType *ot)
static void ptcache_job_update(void *customdata, float progress, int *cancel)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, 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
struct PTCacheEdit * edit
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct wmOperatorType * type
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_kill_type(struct wmWindowManager *wm, const void *owner, int 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 *))
void WM_jobs_timer(wmJob *wm_job, double timestep, unsigned int note, unsigned int endnote)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, int flag, int job_type)