diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-08 20:26:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-12 23:36:43 +0300 |
commit | 77879ac038e3576eeeeb651ce78706cb95399098 (patch) | |
tree | e3816728abb2e98b92c4c639f356afba0a8dd3b6 /source/blender/blenkernel/intern/dynamicpaint.c | |
parent | 6700c02e53ed02fbabc36cd6763f65f74e2ab304 (diff) |
Fix T55376: instanced collection render visibility ignored.
For physics simulation it's still fuzzy though, but this needs bigger
design for how it works with view layers and visibility.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 0b2c65a7b8d..ed2566c9bb5 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -490,9 +490,9 @@ static void scene_setSubframe(Scene *scene, float subframe) scene->r.subframe = subframe; } -static int surface_getBrushFlags(DynamicPaintSurface *surface, const ViewLayer *view_layer) +static int surface_getBrushFlags(DynamicPaintSurface *surface, const Depsgraph *depsgraph) { - Base *base = BKE_collection_or_layer_objects(NULL, NULL, view_layer, surface->brush_group); + Base *base = BKE_collection_or_layer_objects(depsgraph, NULL, NULL, surface->brush_group); Object *brushObj = NULL; ModifierData *md = NULL; @@ -5758,7 +5758,7 @@ static void dynamic_paint_generate_bake_data_cb( } } -static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const ViewLayer *view_layer, Object *ob) +static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Depsgraph *depsgraph, Object *ob) { PaintSurfaceData *sData = surface->data; PaintBakeData *bData = sData->bData; @@ -5766,7 +5766,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Vie int index; bool new_bdata = false; const bool do_velocity_data = ((surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) || - (surface_getBrushFlags(surface, view_layer) & BRUSH_USES_VELOCITY)); + (surface_getBrushFlags(surface, depsgraph) & BRUSH_USES_VELOCITY)); const bool do_accel_data = (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) != 0; int canvasNumOfVerts = dm->getNumVerts(dm); @@ -5912,8 +5912,7 @@ static int dynamicPaint_doStep( { Object *brushObj = NULL; ModifierData *md = NULL; - ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph); - Base *base = BKE_collection_or_layer_objects(NULL, NULL, view_layer, surface->brush_group); + Base *base = BKE_collection_or_layer_objects(depsgraph, NULL, NULL, surface->brush_group); /* backup current scene frame */ int scene_frame = scene->r.cfra; @@ -6051,8 +6050,7 @@ int dynamicPaint_calculateFrame( dynamicPaint_applySurfaceDisplace(surface, surface->canvas->dm); /* update bake data */ - ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph); - dynamicPaint_generateBakeData(surface, view_layer, cObject); + dynamicPaint_generateBakeData(surface, depsgraph, cObject); /* don't do substeps for first frame */ if (surface->substeps && (frame != surface->start_frame)) { |