Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-03 16:36:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-03 16:36:49 +0300
commit0ba0993f18c135f260a8278a911185452011fea4 (patch)
tree4463c50e403116c17f1753cd8100cd9aa076a306 /source/blender/editors/physics
parent95ccaed9e652f20a97d0a4d63ac3c9825944c897 (diff)
Depsgraph: Port more areas to direct depsgraph API
This is a lots of changes, but they are boiling down to a simple API changes where we are no longer relying on implicit usage of scene's depsgraph and pass depsgraph explicitly. There should be no user measurable difference, render_layer* tests are also passing.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c6
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
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);