diff options
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 7de94be0c7a..210d8351945 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -289,6 +289,7 @@ typedef struct DynamicPaintBakeJob { struct Main *bmain; Scene *scene; SceneLayer *scene_layer; + Depsgraph *depsgraph; Object *ob; DynamicPaintSurface *surface; @@ -364,7 +365,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job) frame = surface->start_frame; orig_frame = scene->r.cfra; scene->r.cfra = (int)frame; - ED_update_for_newframe(job->bmain, scene); + ED_update_for_newframe(job->bmain, scene, job->depsgraph); /* Init surface */ if (!dynamicPaint_createUVSurface(scene, surface, job->progress, job->do_update)) { @@ -390,7 +391,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job) /* calculate a frame */ scene->r.cfra = (int)frame; - ED_update_for_newframe(job->bmain, scene); + ED_update_for_newframe(job->bmain, scene, job->depsgraph); if (!dynamicPaint_calculateFrame(surface, job->eval_ctx, scene, cObject, frame)) { job->success = 0; return; @@ -491,6 +492,7 @@ static int dynamicpaint_bake_exec(struct bContext *C, struct wmOperator *op) job->bmain = CTX_data_main(C); job->scene = scene; job->scene_layer = sl; + job->depsgraph = CTX_data_depsgraph(C); job->ob = ob; job->canvas = canvas; job->surface = surface; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 060ac046ba1..a5e92802c6f 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -332,6 +332,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid { Scene *scene = CTX_data_scene(C); SceneLayer *sl = CTX_data_scene_layer(C); + Depsgraph *depsgraph = CTX_data_depsgraph(C); EvaluationContext eval_ctx; Base *base; int i; @@ -408,7 +409,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid /* Modifying the global scene isn't nice, but we can do it in * this part of the process before a threaded job is created */ scene->r.cfra = (int)eval_time; - ED_update_for_newframe(CTX_data_main(C), scene); + ED_update_for_newframe(CTX_data_main(C), scene, depsgraph); /* now scene data should be current according to animation system, so we fill the channels */ @@ -846,6 +847,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor { Scene *scene = CTX_data_scene(C); SceneLayer *sl = CTX_data_scene_layer(C); + Depsgraph *depsgraph = CTX_data_depsgraph(C); int i; FluidsimSettings *domainSettings; @@ -957,7 +959,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor /* reset to original current frame */ scene->r.cfra = origFrame; - ED_update_for_newframe(CTX_data_main(C), scene); + ED_update_for_newframe(CTX_data_main(C), scene, depsgraph); /* ******** init domain object's matrix ******** */ copy_m4_m4(domainMat, fsDomain->obmat); |