diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-05-22 14:43:53 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-05-22 18:16:31 +0300 |
commit | a76e804309421a2a95db94b85d21c2aaade982c4 (patch) | |
tree | eddecbe855e2d02e01c8a5d57ae78a99b6551fee /source/blender/editors/physics | |
parent | 0236863c6d66e8332bd06228e9a52d82d645daa0 (diff) |
Fix T76960: fluid baking operators not working with pinned object
Maniphest Tasks: T76960
Differential Revision: https://developer.blender.org/D7819
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index eb808398254..d281320eb5a 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -52,6 +52,7 @@ #include "DEG_depsgraph.h" +#include "ED_object.h" #include "ED_screen.h" #include "PIL_time.h" @@ -154,7 +155,7 @@ static bool fluid_initjob( { FluidModifierData *mmd = NULL; FluidDomainSettings *mds; - Object *ob = CTX_data_active_object(C); + Object *ob = ED_object_active_context(C); mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid); if (!mmd) { @@ -170,7 +171,7 @@ static bool fluid_initjob( job->bmain = CTX_data_main(C); job->scene = CTX_data_scene(C); job->depsgraph = CTX_data_depsgraph_pointer(C); - job->ob = CTX_data_active_object(C); + job->ob = ob; job->mmd = mmd; job->type = op->type->idname; job->name = op->type->name; @@ -616,7 +617,7 @@ static int fluid_free_exec(struct bContext *C, struct wmOperator *op) { FluidModifierData *mmd = NULL; FluidDomainSettings *mds; - Object *ob = CTX_data_active_object(C); + Object *ob = ED_object_active_context(C); Scene *scene = CTX_data_scene(C); /* @@ -679,7 +680,7 @@ static int fluid_pause_exec(struct bContext *C, struct wmOperator *op) { FluidModifierData *mmd = NULL; FluidDomainSettings *mds; - Object *ob = CTX_data_active_object(C); + Object *ob = ED_object_active_context(C); /* * Get modifier data |