|
Blender
V2.93
|
#include <math.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include "MEM_guardedalloc.h"#include "DNA_action_types.h"#include "DNA_object_types.h"#include "BLI_blenlib.h"#include "BLI_path_util.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "BKE_context.h"#include "BKE_fluid.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_modifier.h"#include "BKE_report.h"#include "BKE_screen.h"#include "DEG_depsgraph.h"#include "ED_object.h"#include "ED_screen.h"#include "PIL_time.h"#include "WM_api.h"#include "WM_types.h"#include "physics_intern.h"#include "DNA_fluid_types.h"#include "DNA_scene_types.h"Go to the source code of this file.
Classes | |
| struct | FluidJob |
Macros | |
| #define | FLUID_JOB_BAKE_ALL "FLUID_OT_bake_all" |
| #define | FLUID_JOB_BAKE_DATA "FLUID_OT_bake_data" |
| #define | FLUID_JOB_BAKE_NOISE "FLUID_OT_bake_noise" |
| #define | FLUID_JOB_BAKE_MESH "FLUID_OT_bake_mesh" |
| #define | FLUID_JOB_BAKE_PARTICLES "FLUID_OT_bake_particles" |
| #define | FLUID_JOB_BAKE_GUIDES "FLUID_OT_bake_guides" |
| #define | FLUID_JOB_FREE_ALL "FLUID_OT_free_all" |
| #define | FLUID_JOB_FREE_DATA "FLUID_OT_free_data" |
| #define | FLUID_JOB_FREE_NOISE "FLUID_OT_free_noise" |
| #define | FLUID_JOB_FREE_MESH "FLUID_OT_free_mesh" |
| #define | FLUID_JOB_FREE_PARTICLES "FLUID_OT_free_particles" |
| #define | FLUID_JOB_FREE_GUIDES "FLUID_OT_free_guides" |
| #define | FLUID_JOB_BAKE_PAUSE "FLUID_OT_pause_bake" |
Typedefs | |
| typedef struct FluidJob | FluidJob |
| #define FLUID_JOB_BAKE_ALL "FLUID_OT_bake_all" |
Definition at line 63 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_DATA "FLUID_OT_bake_data" |
Definition at line 64 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_GUIDES "FLUID_OT_bake_guides" |
Definition at line 68 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_MESH "FLUID_OT_bake_mesh" |
Definition at line 66 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_NOISE "FLUID_OT_bake_noise" |
Definition at line 65 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_PARTICLES "FLUID_OT_bake_particles" |
Definition at line 67 of file physics_fluid.c.
| #define FLUID_JOB_BAKE_PAUSE "FLUID_OT_pause_bake" |
Definition at line 75 of file physics_fluid.c.
| #define FLUID_JOB_FREE_ALL "FLUID_OT_free_all" |
Definition at line 69 of file physics_fluid.c.
| #define FLUID_JOB_FREE_DATA "FLUID_OT_free_data" |
Definition at line 70 of file physics_fluid.c.
| #define FLUID_JOB_FREE_GUIDES "FLUID_OT_free_guides" |
Definition at line 74 of file physics_fluid.c.
| #define FLUID_JOB_FREE_MESH "FLUID_OT_free_mesh" |
Definition at line 72 of file physics_fluid.c.
| #define FLUID_JOB_FREE_NOISE "FLUID_OT_free_noise" |
Definition at line 71 of file physics_fluid.c.
| #define FLUID_JOB_FREE_PARTICLES "FLUID_OT_free_particles" |
Definition at line 73 of file physics_fluid.c.
|
static |
Definition at line 315 of file physics_fluid.c.
References BKE_spacedata_draw_locks(), FluidDomainSettings::cache_flag, DEG_id_tag_update(), FluidModifierData::domain, FluidDomainSettings::error, FLUID_DOMAIN_BAKED_DATA, FLUID_DOMAIN_BAKED_GUIDE, FLUID_DOMAIN_BAKED_MESH, FLUID_DOMAIN_BAKED_NOISE, FLUID_DOMAIN_BAKED_PARTICLES, FLUID_DOMAIN_BAKING_DATA, FLUID_DOMAIN_BAKING_GUIDE, FLUID_DOMAIN_BAKING_MESH, FLUID_DOMAIN_BAKING_NOISE, FLUID_DOMAIN_BAKING_PARTICLES, FLUID_DOMAIN_OUTDATED_DATA, FLUID_DOMAIN_OUTDATED_GUIDE, FLUID_DOMAIN_OUTDATED_MESH, FLUID_DOMAIN_OUTDATED_NOISE, FLUID_DOMAIN_OUTDATED_PARTICLES, fluid_is_bake_all(), fluid_is_bake_data(), fluid_is_bake_guiding(), fluid_is_bake_mesh(), fluid_is_bake_noise(), fluid_is_bake_particle(), FluidJob::fmd, G, G_MAIN, Object::id, ID_RECALC_GEOMETRY, FluidJob::name, FluidJob::ob, PIL_check_seconds_timer(), RPT_ERROR, RPT_INFO, RPT_WARNING, FluidJob::start, FluidJob::success, WM_reportf(), and WM_set_locked_interface().
Referenced by fluid_bake_exec(), and fluid_bake_invoke().
|
static |
Definition at line 530 of file physics_fluid.c.
References BKE_report(), FluidJob::bmain, C, fluid_bake_endjob(), fluid_bake_free(), fluid_bake_startjob(), fluid_initjob(), fluid_validatepaths(), MEM_mallocN, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_report_banners_cancel().
Referenced by FLUID_OT_bake_all(), FLUID_OT_bake_data(), FLUID_OT_bake_guides(), FLUID_OT_bake_mesh(), FLUID_OT_bake_noise(), and FLUID_OT_bake_particles().
|
static |
Definition at line 240 of file physics_fluid.c.
References MEM_freeN.
Referenced by fluid_bake_exec(), fluid_bake_invoke(), and fluid_free_exec().
|
static |
Definition at line 555 of file physics_fluid.c.
References BKE_report(), FluidJob::bmain, C, CTX_data_scene(), CTX_wm_manager(), CTX_wm_window(), fluid_bake_endjob(), fluid_bake_free(), fluid_bake_startjob(), fluid_initjob(), fluid_validatepaths(), MEM_mallocN, NC_OBJECT, ND_MODIFIER, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::reports, RPT_ERROR, scene, WM_event_add_modal_handler(), WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_SIM_FLUID, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), WM_jobs_timer(), WM_report_banners_cancel(), and WM_set_locked_interface().
Referenced by FLUID_OT_bake_all(), FLUID_OT_bake_data(), FLUID_OT_bake_guides(), FLUID_OT_bake_mesh(), FLUID_OT_bake_noise(), and FLUID_OT_bake_particles().
|
static |
Definition at line 598 of file physics_fluid.c.
References C, CTX_data_scene(), CTX_wm_manager(), EVT_ESCKEY, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmEvent::type, WM_JOB_TYPE_OBJECT_SIM_FLUID, and WM_jobs_test().
Referenced by FLUID_OT_bake_all(), FLUID_OT_bake_data(), FLUID_OT_bake_guides(), FLUID_OT_bake_mesh(), FLUID_OT_bake_noise(), and FLUID_OT_bake_particles().
|
static |
Definition at line 246 of file physics_fluid.c.
References BLI_strncpy(), FluidJob::bmain, FluidDomainSettings::cache_frame_end, FluidDomainSettings::cache_frame_start, CFRA, FluidJob::depsgraph, FluidJob::do_update, FluidModifierData::domain, ED_update_for_newframe(), FluidDomainSettings::error, FluidJob::fmd, G, N_, NULL, FluidJob::pause_frame, FluidJob::progress, scene, FluidJob::scene, and FluidJob::success.
Referenced by fluid_bake_startjob().
|
static |
Definition at line 368 of file physics_fluid.c.
References BKE_modifier_path_relbase_from_global(), BKE_spacedata_draw_locks(), BLI_dir_create_recursive(), BLI_path_abs(), BLI_path_join(), FluidDomainSettings::cache_directory, FluidDomainSettings::cache_flag, FluidDomainSettings::cache_frame_pause_data, FluidDomainSettings::cache_frame_pause_guide, FluidDomainSettings::cache_frame_pause_mesh, FluidDomainSettings::cache_frame_pause_noise, FluidDomainSettings::cache_frame_pause_particles, DEG_id_tag_update(), FluidJob::do_update, FluidModifierData::domain, FILE_MAX, FluidDomainSettings::flags, fluid_bake_sequence(), FLUID_DOMAIN_BAKED_DATA, FLUID_DOMAIN_BAKED_GUIDE, FLUID_DOMAIN_BAKED_MESH, FLUID_DOMAIN_BAKED_NOISE, FLUID_DOMAIN_BAKED_PARTICLES, FLUID_DOMAIN_BAKING_DATA, FLUID_DOMAIN_BAKING_GUIDE, FLUID_DOMAIN_BAKING_MESH, FLUID_DOMAIN_BAKING_NOISE, FLUID_DOMAIN_BAKING_PARTICLES, FLUID_DOMAIN_DIR_CONFIG, FLUID_DOMAIN_DIR_DATA, FLUID_DOMAIN_DIR_GUIDE, FLUID_DOMAIN_DIR_MESH, FLUID_DOMAIN_DIR_NOISE, FLUID_DOMAIN_DIR_PARTICLES, FLUID_DOMAIN_DIR_SCRIPT, FLUID_DOMAIN_EXPORT_MANTA_SCRIPT, FLUID_DOMAIN_OUTDATED_DATA, FLUID_DOMAIN_OUTDATED_GUIDE, FLUID_DOMAIN_OUTDATED_MESH, FLUID_DOMAIN_OUTDATED_NOISE, FLUID_DOMAIN_OUTDATED_PARTICLES, fluid_is_bake_all(), fluid_is_bake_data(), fluid_is_bake_guiding(), fluid_is_bake_mesh(), fluid_is_bake_noise(), fluid_is_bake_particle(), FluidJob::fmd, G, Object::id, ID_RECALC_GEOMETRY, NULL, FluidJob::ob, FluidJob::pause_frame, PIL_check_seconds_timer(), FluidJob::progress, FluidJob::start, FluidJob::stop, and FluidJob::success.
Referenced by fluid_bake_exec(), and fluid_bake_invoke().
|
static |
Definition at line 451 of file physics_fluid.c.
References BKE_spacedata_draw_locks(), DEG_id_tag_update(), FluidModifierData::domain, FluidDomainSettings::error, FluidJob::fmd, G, G_MAIN, Object::id, ID_RECALC_GEOMETRY, FluidJob::name, FluidJob::ob, PIL_check_seconds_timer(), RPT_ERROR, RPT_INFO, RPT_WARNING, FluidJob::start, FluidJob::success, WM_reportf(), and WM_set_locked_interface().
Referenced by fluid_free_exec().
|
static |
Definition at line 612 of file physics_fluid.c.
References BKE_modifiers_findby_type(), BKE_report(), FluidJob::bmain, C, FluidDomainSettings::cache_flag, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_window(), FluidJob::depsgraph, FluidModifierData::domain, ED_object_active_context(), eModifierType_Fluid, fluid_bake_free(), FLUID_DOMAIN_BAKING_DATA, FLUID_DOMAIN_BAKING_MESH, FLUID_DOMAIN_BAKING_NOISE, FLUID_DOMAIN_BAKING_PARTICLES, fluid_free_endjob(), fluid_free_startjob(), fluid_validatepaths(), FluidJob::fmd, wmOperatorType::idname, MEM_mallocN, FluidJob::name, wmOperatorType::name, NC_OBJECT, ND_MODIFIER, NULL, FluidJob::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, scene, FluidJob::scene, FluidJob::type, wmOperator::type, WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_SIM_FLUID, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), WM_jobs_timer(), WM_report_banners_cancel(), and WM_set_locked_interface().
Referenced by FLUID_OT_free_all(), FLUID_OT_free_data(), FLUID_OT_free_guides(), FLUID_OT_free_mesh(), FLUID_OT_free_noise(), and FLUID_OT_free_particles().
|
static |
Definition at line 480 of file physics_fluid.c.
References BKE_fluid_cache_free(), BKE_spacedata_draw_locks(), FluidJob::bmain, FluidJob::depsgraph, FluidJob::do_update, FluidModifierData::domain, ED_update_for_newframe(), FLUID_DOMAIN_OUTDATED_DATA, FLUID_DOMAIN_OUTDATED_GUIDE, FLUID_DOMAIN_OUTDATED_MESH, FLUID_DOMAIN_OUTDATED_NOISE, FLUID_DOMAIN_OUTDATED_PARTICLES, fluid_is_free_all(), fluid_is_free_data(), fluid_is_free_guiding(), fluid_is_free_mesh(), fluid_is_free_noise(), fluid_is_free_particles(), FluidJob::fmd, G, FluidJob::ob, PIL_check_seconds_timer(), FluidJob::progress, FluidJob::start, FluidJob::stop, FluidJob::success, and UNUSED_VARS.
Referenced by fluid_free_exec().
|
static |
Definition at line 147 of file physics_fluid.c.
References BKE_modifiers_findby_type(), BLI_strncpy(), FluidJob::bmain, C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), FluidJob::depsgraph, FluidModifierData::domain, ED_object_active_context(), eModifierType_Fluid, FluidJob::fmd, wmOperatorType::idname, N_, FluidJob::name, wmOperatorType::name, NULL, FluidJob::ob, FluidJob::scene, FluidJob::type, and wmOperator::type.
Referenced by fluid_bake_exec(), and fluid_bake_invoke().
|
inlinestatic |
Definition at line 98 of file physics_fluid.c.
References FLUID_JOB_BAKE_ALL, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 102 of file physics_fluid.c.
References FLUID_JOB_BAKE_DATA, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 118 of file physics_fluid.c.
References FLUID_JOB_BAKE_GUIDES, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 110 of file physics_fluid.c.
References FLUID_JOB_BAKE_MESH, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 106 of file physics_fluid.c.
References FLUID_JOB_BAKE_NOISE, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 114 of file physics_fluid.c.
References FLUID_JOB_BAKE_PARTICLES, STREQ, and FluidJob::type.
Referenced by fluid_bake_endjob(), and fluid_bake_startjob().
|
inlinestatic |
Definition at line 122 of file physics_fluid.c.
References FLUID_JOB_FREE_ALL, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
|
inlinestatic |
Definition at line 126 of file physics_fluid.c.
References FLUID_JOB_FREE_DATA, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
|
inlinestatic |
Definition at line 142 of file physics_fluid.c.
References FLUID_JOB_FREE_GUIDES, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
|
inlinestatic |
Definition at line 134 of file physics_fluid.c.
References FLUID_JOB_FREE_MESH, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
|
inlinestatic |
Definition at line 130 of file physics_fluid.c.
References FLUID_JOB_FREE_NOISE, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
|
inlinestatic |
Definition at line 138 of file physics_fluid.c.
References FLUID_JOB_FREE_PARTICLES, STREQ, and FluidJob::type.
Referenced by fluid_free_startjob().
| void FLUID_OT_bake_all | ( | wmOperatorType * | ot | ) |
Definition at line 701 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_ALL, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_bake_data | ( | wmOperatorType * | ot | ) |
Definition at line 727 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_DATA, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_bake_guides | ( | wmOperatorType * | ot | ) |
Definition at line 831 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_GUIDES, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_bake_mesh | ( | wmOperatorType * | ot | ) |
Definition at line 779 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_MESH, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_bake_noise | ( | wmOperatorType * | ot | ) |
Definition at line 753 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_NOISE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_bake_particles | ( | wmOperatorType * | ot | ) |
Definition at line 805 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_bake_exec(), fluid_bake_invoke(), fluid_bake_modal(), FLUID_JOB_BAKE_PARTICLES, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_all | ( | wmOperatorType * | ot | ) |
Definition at line 715 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_ALL, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_data | ( | wmOperatorType * | ot | ) |
Definition at line 741 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_DATA, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_guides | ( | wmOperatorType * | ot | ) |
Definition at line 845 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_GUIDES, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_mesh | ( | wmOperatorType * | ot | ) |
Definition at line 793 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_MESH, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_noise | ( | wmOperatorType * | ot | ) |
Definition at line 767 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_NOISE, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_free_particles | ( | wmOperatorType * | ot | ) |
Definition at line 819 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, fluid_free_exec(), FLUID_JOB_FREE_PARTICLES, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
| void FLUID_OT_pause_bake | ( | wmOperatorType * | ot | ) |
Definition at line 857 of file physics_fluid.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, FLUID_JOB_BAKE_PAUSE, fluid_pause_exec(), wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_fluid().
|
static |
Definition at line 676 of file physics_fluid.c.
References BKE_modifiers_findby_type(), BKE_report(), C, FluidModifierData::domain, ED_object_active_context(), eModifierType_Fluid, G, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, and RPT_ERROR.
Referenced by FLUID_OT_pause_bake().
|
static |
Definition at line 176 of file physics_fluid.c.
References BKE_fluid_cache_new_name_for_current_session(), BKE_modifier_path_init(), BKE_modifier_path_relbase(), BKE_reportf(), BLI_dir_create_recursive(), BLI_path_abs(), BLI_path_rel(), BLI_strncpy(), FluidJob::bmain, FluidDomainSettings::cache_directory, FluidModifierData::domain, FILE_MAX, FILE_MAXDIR, FluidJob::fmd, FluidJob::ob, RPT_ERROR, and RPT_WARNING.
Referenced by fluid_bake_exec(), fluid_bake_invoke(), and fluid_free_exec().