Page MenuHome

Fix T62348: Cycles - Viewport rendering not update on switching viewlayer
ClosedPublic

Authored by Dalai Felinto (dfelinto) on Mar 15 2019, 10:02 PM.

Diff Detail

Repository
rB Blender
Branch
dev-fix-T62348-cycles-update (branched from master)
Build Status
Buildable 3220
Build 3220: arc lint + arc unit

Event Timeline

Sergey Sharybin (sergey) requested changes to this revision.Mar 19 2019, 9:56 AM

Switching view layer does not change scene, so tagging it fo update doesn't seem correct. Keep in mind, doing that will re-set all possibly ongoing viewport renders in other windows (which should be avoidable since dependency graph is per-viewlayer).

This revision now requires changes to proceed.Mar 19 2019, 9:56 AM

I suggest to add a ED_render_view_layer_changed which calls ED_render_engine_area_exit for every editor affected. Render engines can't really reuse any state from another view layer.

  • It updates only the main window you edit and the non-main window children of this main one.
Brecht Van Lommel (brecht) requested changes to this revision.Mar 22 2019, 3:32 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/makesrna/intern/rna_wm.c
805–816 ↗(On Diff #14356)

This code should go into WM_window_set_active_view_layer, so all places that change the view layer get the appropriate updates. Otherwise changing the view layer from the outliner does not update properly.

This revision now requires changes to proceed.Mar 22 2019, 3:32 PM
  • From review: move logic inside WM_window_set_active_view_layer

I refactored the function a bit to tackle both parent and children at the same time.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 22 2019, 4:46 PM
This revision was automatically updated to reflect the committed changes.