63 #define FLUID_JOB_BAKE_ALL "FLUID_OT_bake_all"
64 #define FLUID_JOB_BAKE_DATA "FLUID_OT_bake_data"
65 #define FLUID_JOB_BAKE_NOISE "FLUID_OT_bake_noise"
66 #define FLUID_JOB_BAKE_MESH "FLUID_OT_bake_mesh"
67 #define FLUID_JOB_BAKE_PARTICLES "FLUID_OT_bake_particles"
68 #define FLUID_JOB_BAKE_GUIDES "FLUID_OT_bake_guides"
69 #define FLUID_JOB_FREE_ALL "FLUID_OT_free_all"
70 #define FLUID_JOB_FREE_DATA "FLUID_OT_free_data"
71 #define FLUID_JOB_FREE_NOISE "FLUID_OT_free_noise"
72 #define FLUID_JOB_FREE_MESH "FLUID_OT_free_mesh"
73 #define FLUID_JOB_FREE_PARTICLES "FLUID_OT_free_particles"
74 #define FLUID_JOB_FREE_GUIDES "FLUID_OT_free_guides"
75 #define FLUID_JOB_BAKE_PAUSE "FLUID_OT_pause_bake"
156 BLI_strncpy(error_msg,
N_(
"Bake failed: no Fluid modifier found"), error_size);
161 BLI_strncpy(error_msg,
N_(
"Bake failed: invalid domain"), error_size);
181 bool is_relative =
false;
192 "Fluid: Empty cache path, reset to default '%s'",
211 "Fluid: Could not create cache directory '%s', reset to default '%s'",
219 "Fluid: Could not use default cache directory '%s', "
220 "please define a valid cache path manually",
250 int frame = 1, orig_frame;
252 int *pause_frame =
NULL;
271 is_first_frame = ((*pause_frame) == 0);
283 (*pause_frame) = frame;
347 G.is_rendering =
false;
359 if (fds->
error[0] !=
'\0') {
383 G.is_rendering =
true;
456 G.is_rendering =
false;
471 if (fds->
error[0] !=
'\0') {
492 G.is_rendering =
true;
533 char error_msg[256] =
"\0";
561 char error_msg[256] =
"\0";
605 switch (event->
type) {
808 ot->
name =
"Bake Particles";
822 ot->
name =
"Free Particles";
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_fluid_cache_new_name_for_current_session(int maxlen, char *r_name)
void BKE_fluid_cache_free(struct FluidDomainSettings *fds, struct Object *ob, int cache_map)
void BKE_modifier_path_init(char *path, int path_maxlen, const char *name)
const char * BKE_modifier_path_relbase_from_global(struct Object *ob)
const char * BKE_modifier_path_relbase(struct Main *bmain, struct Object *ob)
struct ModifierData * BKE_modifiers_findby_type(const struct Object *ob, ModifierType type)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_spacedata_draw_locks(bool set)
bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL()
size_t BLI_path_join(char *__restrict dst, const size_t dst_len, const char *path_first,...) ATTR_NONNULL(1
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ FLUID_DOMAIN_BAKED_DATA
@ FLUID_DOMAIN_OUTDATED_GUIDE
@ FLUID_DOMAIN_OUTDATED_PARTICLES
@ FLUID_DOMAIN_BAKING_MESH
@ FLUID_DOMAIN_BAKING_NOISE
@ FLUID_DOMAIN_BAKING_GUIDE
@ FLUID_DOMAIN_OUTDATED_NOISE
@ FLUID_DOMAIN_BAKED_NOISE
@ FLUID_DOMAIN_BAKED_MESH
@ FLUID_DOMAIN_OUTDATED_MESH
@ FLUID_DOMAIN_BAKING_DATA
@ FLUID_DOMAIN_BAKED_GUIDE
@ FLUID_DOMAIN_BAKED_PARTICLES
@ FLUID_DOMAIN_OUTDATED_DATA
@ FLUID_DOMAIN_BAKING_PARTICLES
#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
@ FLUID_DOMAIN_EXPORT_MANTA_SCRIPT
#define FLUID_DOMAIN_DIR_CONFIG
#define FLUID_DOMAIN_DIR_NOISE
Object is a sort of wrapper for general info.
struct Object * ED_object_active_context(const struct bContext *C)
bool ED_operator_object_active_editable(struct bContext *C)
void ED_update_for_newframe(struct Main *bmain, struct Depsgraph *depsgraph)
Read Guarded memory(de)allocation.
Platform independent time functions.
@ WM_JOB_TYPE_OBJECT_SIM_FLUID
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
#define FLUID_JOB_FREE_DATA
static int fluid_bake_invoke(struct bContext *C, struct wmOperator *op, const wmEvent *UNUSED(_event))
#define FLUID_JOB_BAKE_GUIDES
#define FLUID_JOB_BAKE_ALL
void FLUID_OT_free_mesh(wmOperatorType *ot)
static void fluid_bake_endjob(void *customdata)
static bool fluid_is_bake_guiding(FluidJob *job)
static bool fluid_is_bake_particle(FluidJob *job)
static bool fluid_is_free_data(FluidJob *job)
static int fluid_bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, float *progress)
static bool fluid_is_bake_noise(FluidJob *job)
static bool fluid_validatepaths(FluidJob *job, ReportList *reports)
#define FLUID_JOB_FREE_MESH
void FLUID_OT_free_particles(wmOperatorType *ot)
static int fluid_pause_exec(struct bContext *C, struct wmOperator *op)
#define FLUID_JOB_FREE_ALL
void FLUID_OT_free_all(wmOperatorType *ot)
void FLUID_OT_bake_guides(wmOperatorType *ot)
static bool fluid_is_free_mesh(FluidJob *job)
void FLUID_OT_free_guides(wmOperatorType *ot)
#define FLUID_JOB_BAKE_PAUSE
void FLUID_OT_bake_particles(wmOperatorType *ot)
static bool fluid_initjob(bContext *C, FluidJob *job, wmOperator *op, char *error_msg, int error_size)
static void fluid_free_endjob(void *customdata)
static bool fluid_is_free_guiding(FluidJob *job)
static int fluid_bake_exec(struct bContext *C, struct wmOperator *op)
static bool fluid_is_bake_all(FluidJob *job)
static void fluid_bake_free(void *customdata)
#define FLUID_JOB_BAKE_NOISE
#define FLUID_JOB_FREE_PARTICLES
void FLUID_OT_bake_all(wmOperatorType *ot)
#define FLUID_JOB_BAKE_PARTICLES
static bool fluid_is_bake_mesh(FluidJob *job)
static bool fluid_is_free_all(FluidJob *job)
static bool fluid_is_free_noise(FluidJob *job)
static bool fluid_is_free_particles(FluidJob *job)
#define FLUID_JOB_FREE_NOISE
void FLUID_OT_bake_data(wmOperatorType *ot)
static void fluid_free_startjob(void *customdata, short *stop, short *do_update, float *progress)
static int fluid_free_exec(struct bContext *C, struct wmOperator *op)
static bool fluid_is_bake_data(FluidJob *job)
void FLUID_OT_free_noise(wmOperatorType *ot)
#define FLUID_JOB_FREE_GUIDES
#define FLUID_JOB_BAKE_DATA
void FLUID_OT_pause_bake(wmOperatorType *ot)
void FLUID_OT_bake_noise(wmOperatorType *ot)
void FLUID_OT_free_data(wmOperatorType *ot)
#define FLUID_JOB_BAKE_MESH
static void fluid_bake_sequence(FluidJob *job)
void FLUID_OT_bake_mesh(wmOperatorType *ot)
int cache_frame_pause_mesh
int cache_frame_pause_data
int cache_frame_pause_particles
int cache_frame_pause_guide
char cache_directory[1024]
int cache_frame_pause_noise
struct FluidDomainSettings * domain
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
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
double PIL_check_seconds_timer(void)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_report_banners_cancel(Main *bmain)
void WM_reportf(ReportType type, const char *format,...)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag, int job_type)
bool WM_jobs_test(wmWindowManager *wm, 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 *))
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)