50#define FLUID_JOB_BAKE_ALL "FLUID_OT_bake_all"
51#define FLUID_JOB_BAKE_DATA "FLUID_OT_bake_data"
52#define FLUID_JOB_BAKE_NOISE "FLUID_OT_bake_noise"
53#define FLUID_JOB_BAKE_MESH "FLUID_OT_bake_mesh"
54#define FLUID_JOB_BAKE_PARTICLES "FLUID_OT_bake_particles"
55#define FLUID_JOB_BAKE_GUIDES "FLUID_OT_bake_guides"
56#define FLUID_JOB_FREE_ALL "FLUID_OT_free_all"
57#define FLUID_JOB_FREE_DATA "FLUID_OT_free_data"
58#define FLUID_JOB_FREE_NOISE "FLUID_OT_free_noise"
59#define FLUID_JOB_FREE_MESH "FLUID_OT_free_mesh"
60#define FLUID_JOB_FREE_PARTICLES "FLUID_OT_free_particles"
61#define FLUID_JOB_FREE_GUIDES "FLUID_OT_free_guides"
62#define FLUID_JOB_BAKE_PAUSE "FLUID_OT_pause_bake"
174 bool is_relative =
false;
185 "Fluid: Empty cache path, reset to default '%s'",
204 "Fluid: Could not create cache directory '%s', reset to default '%s'",
212 "Fluid: Could not use default cache directory '%s', "
213 "please define a valid cache path manually",
242 char error_msg[256] =
"\0";
263 int frame = 1, orig_frame;
265 int *pause_frame =
nullptr;
284 is_first_frame = ((*pause_frame) == 0);
288 orig_frame = scene->
r.
cfra;
289 scene->
r.
cfra = frame;
296 (*pause_frame) = frame;
312 scene->
r.
cfra = frame;
325 scene->
r.
cfra = orig_frame;
360 G.is_rendering =
false;
368 "Fluid: %s complete (%.2fs)",
373 if (fds->
error[0] !=
'\0') {
375 "Fluid: %s failed at frame %d: %s",
382 "Fluid: %s canceled at frame %d!",
404 G.is_rendering =
true;
465 worker_status->
stop =
false;
473 G.is_rendering =
false;
484 "Fluid: %s complete (%.2fs)",
489 if (fds->
error[0] !=
'\0') {
491 "Fluid: %s failed at frame %d: %s",
498 "Fluid: %s canceled at frame %d!",
517 G.is_rendering =
true;
548 worker_status->
stop =
false;
559 if (job ==
nullptr) {
574 if (job ==
nullptr) {
604 switch (event->
type) {
617 if (job ==
nullptr) {
632 if (job ==
nullptr) {
662 switch (event->
type) {
700 ot->
name =
"Bake All";
714 ot->
name =
"Free All";
728 ot->
name =
"Bake Data";
742 ot->
name =
"Free Data";
754 ot->
name =
"Bake Noise";
768 ot->
name =
"Free Noise";
780 ot->
name =
"Bake Mesh";
794 ot->
name =
"Free Mesh";
806 ot->
name =
"Bake Particles";
820 ot->
name =
"Free Particles";
832 ot->
name =
"Bake Guides";
846 ot->
name =
"Free Guides";
858 ot->
name =
"Pause Bake";
File and directory operations.
#define BLI_path_join(...)
#define STRNCPY_UTF8(dst, src)
Platform independent time functions.
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define CTX_RPT_(context, msgid)
#define FLUID_DOMAIN_DIR_DATA
#define FLUID_DOMAIN_DIR_PARTICLES
#define FLUID_DOMAIN_DIR_MESH
#define FLUID_DOMAIN_DIR_GUIDE
#define FLUID_DOMAIN_DIR_SCRIPT
#define FLUID_DOMAIN_DIR_CONFIG
#define FLUID_DOMAIN_DIR_NOISE
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
Object * context_active_object(const bContext *C)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BKE_fluid_cache_new_name_for_current_session(int maxlen, char *r_name)
static bool fluid_is_bake_guiding(FluidJob *job)
void FLUID_OT_bake_all(wmOperatorType *ot)
void WM_global_reportf(eReportType type, const char *format,...)
static void fluid_bake_startjob(void *customdata, wmJobWorkerStatus *worker_status)
static wmOperatorStatus fluid_free_exec(bContext *C, wmOperator *op)
static bool fluid_is_bake_mesh(FluidJob *job)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
static void fluid_free_endjob(void *customdata)
@ REGION_DRAW_LOCK_BAKING
static bool fluid_job_init(bContext *C, FluidJob *job, wmOperator *op, char *error_msg, int error_msg_maxncpy)
static void fluid_bake_sequence(FluidJob *job)
void BKE_spacedata_draw_locks(ARegionDrawLockFlags lock_flags)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
bool BLI_dir_create_recursive(const char *dirname) ATTR_NONNULL()
void FLUID_OT_free_noise(wmOperatorType *ot)
@ WM_JOB_TYPE_OBJECT_SIM_FLUID
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void FLUID_OT_free_guides(wmOperatorType *ot)
wmWindow * CTX_wm_window(const bContext *C)
static wmOperatorStatus fluid_free_invoke(bContext *C, wmOperator *op, const wmEvent *)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
void WM_report_banners_cancel(Main *bmain)
void FLUID_OT_free_particles(wmOperatorType *ot)
@ FLUID_DOMAIN_EXPORT_MANTA_SCRIPT
static bool fluid_is_free_particles(FluidJob *job)
static void fluid_job_free(void *customdata)
static bool fluid_is_free_noise(FluidJob *job)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
const char * BKE_modifier_path_relbase(Main *bmain, Object *ob)
void WM_locked_interface_set(wmWindowManager *wm, bool lock)
void WM_locked_interface_set_with_flags(wmWindowManager *wm, short lock_flags)
void FLUID_OT_bake_guides(wmOperatorType *ot)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
static void fluid_bake_endjob(void *customdata)
void FLUID_OT_free_data(wmOperatorType *ot)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
static bool fluid_is_bake_noise(FluidJob *job)
bool WM_jobs_has_running(const wmWindowManager *window_manager, const void *owner, const eWM_JobType type, const eWM_JobFlag exclude_flags)
static bool fluid_is_free_guiding(FluidJob *job)
wmWindowManager * CTX_wm_manager(const bContext *C)
static FluidJob * fluid_job_create(bContext *C, wmOperator *op)
void FLUID_OT_bake_noise(wmOperatorType *ot)
bool void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1)
static void fluid_free_startjob(void *customdata, wmJobWorkerStatus *worker_status)
bool ED_operator_object_active_editable(bContext *C)
static bool fluid_is_bake_particle(FluidJob *job)
static bool fluid_validate_paths(FluidJob *job, ReportList *reports)
void FLUID_OT_free_mesh(wmOperatorType *ot)
void BKE_fluid_cache_free(struct FluidDomainSettings *fds, struct Object *ob, int cache_map)
@ FLUID_DOMAIN_BAKED_PARTICLES
@ FLUID_DOMAIN_BAKED_GUIDE
@ FLUID_DOMAIN_BAKED_NOISE
@ FLUID_DOMAIN_OUTDATED_MESH
@ FLUID_DOMAIN_BAKED_DATA
@ FLUID_DOMAIN_OUTDATED_NOISE
@ FLUID_DOMAIN_BAKING_NOISE
@ FLUID_DOMAIN_BAKING_MESH
@ FLUID_DOMAIN_OUTDATED_GUIDE
@ FLUID_DOMAIN_BAKED_MESH
@ FLUID_DOMAIN_OUTDATED_PARTICLES
@ FLUID_DOMAIN_BAKING_PARTICLES
@ FLUID_DOMAIN_BAKING_DATA
@ FLUID_DOMAIN_OUTDATED_DATA
@ FLUID_DOMAIN_BAKING_GUIDE
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void ED_update_for_newframe(Main *bmain, Depsgraph *depsgraph)
static bool fluid_is_free_data(FluidJob *job)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void FLUID_OT_free_all(wmOperatorType *ot)
Main * CTX_data_main(const bContext *C)
static bool fluid_is_free_mesh(FluidJob *job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void FLUID_OT_bake_mesh(wmOperatorType *ot)
double BLI_time_now_seconds()
static wmOperatorStatus fluid_free_modal(bContext *C, wmOperator *, const wmEvent *event)
Scene * CTX_data_scene(const bContext *C)
static wmOperatorStatus fluid_bake_exec(bContext *C, wmOperator *op)
void FLUID_OT_bake_data(wmOperatorType *ot)
static bool fluid_is_bake_data(FluidJob *job)
static wmOperatorStatus fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool fluid_is_bake_all(FluidJob *job)
const char * BKE_modifier_path_relbase_from_global(Object *ob)
void BKE_modifier_path_init(char *path, int path_maxncpy, const char *name)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote, void(*timer_step)(void *))
static wmOperatorStatus fluid_bake_modal(bContext *C, wmOperator *, const wmEvent *event)
void FLUID_OT_bake_particles(wmOperatorType *ot)
static bool fluid_is_free_all(FluidJob *job)
void FLUID_OT_pause_bake(wmOperatorType *ot)
static wmOperatorStatus fluid_pause_exec(bContext *C, wmOperator *op)
#define FLUID_JOB_FREE_DATA
#define FLUID_JOB_BAKE_GUIDES
#define FLUID_JOB_BAKE_ALL
#define FLUID_JOB_FREE_MESH
#define FLUID_JOB_FREE_ALL
#define FLUID_JOB_BAKE_PAUSE
#define FLUID_JOB_BAKE_NOISE
#define FLUID_JOB_FREE_PARTICLES
#define FLUID_JOB_BAKE_PARTICLES
#define FLUID_JOB_FREE_NOISE
#define FLUID_JOB_FREE_GUIDES
#define FLUID_JOB_BAKE_DATA
#define FLUID_JOB_BAKE_MESH
eFluidDomain_CacheFlag cache_flag
int cache_frame_pause_guide
int cache_frame_pause_data
int cache_frame_pause_mesh
int cache_frame_pause_noise
int cache_frame_pause_particles
char cache_directory[1024]
struct FluidDomainSettings * domain
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type