Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/physics_fluid.c
| Show All 40 Lines | |||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_object.h" | |||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "physics_intern.h" // own include | #include "physics_intern.h" // own include | ||||
| /* enable/disable overall compilation */ | /* enable/disable overall compilation */ | ||||
| #ifdef WITH_MOD_FLUID | #ifdef WITH_MOD_FLUID | ||||
| ▲ Show 20 Lines • Show All 1,154 Lines • ▼ Show 20 Lines | |||||
| static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| /* only one bake job at a time */ | /* only one bake job at a time */ | ||||
| if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID)) { | if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), true)) { | if (!fluidsimBake(C, op->reports, ED_object_context(C), true)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int fluid_bake_exec(bContext *C, wmOperator *op) | static int fluid_bake_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Show All 19 Lines | |||||