Page MenuHome

Fix T84717: missing 3D viewport updates when changing shading settings
ClosedPublic

Authored by Brecht Van Lommel (brecht) on Jan 28 2021, 4:05 PM.

Details

Summary

Previously this relied on the dependency graph to detect changes in the screen
datablock, which would then notify the renderers. This was rather indirect an
not even really by design. Instead use notifiers to tag specific 3D viewports
to be updated.

Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer.

Testing if this works correctly requires adding back commits 81d444c and 088904d,
since those have been temporarily reverted.

Diff Detail

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

Event Timeline

Brecht Van Lommel (brecht) requested review of this revision.Jan 28 2021, 4:05 PM
Brecht Van Lommel (brecht) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Jan 29 2021, 10:03 AM

Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer.

I would suggest this to be committed separately, as a non-functional-changes commit.

source/blender/editors/include/ED_render.h
62

Use bool in new code.

source/blender/editors/render/render_update.c
81

LISTBASE_FOREACH?

Hard to tell, patch makes it look like a new code, but could very well be just un-indented old code.

110

Aaaw, I see whatcha doing here ;)
Yes, Brecht, we do carefully read your code ;)

157

LISTBASE_FOREACH

This revision now requires changes to proceed.Jan 29 2021, 10:03 AM

Address comments.

Once this is accepted, I'll restore the two reverted commits and do the const
changes in a separeate commit.

Brecht Van Lommel (brecht) marked 4 inline comments as done.Jan 29 2021, 3:49 PM

The code looks good now!
From careful reading seems fine. In the middle of tricky threading issue at this moment, so did not double-checked that the shading is fixed. If its fixed for you I trust it to be fixed for everyone :)

Once this is accepted, I'll restore the two reverted commits and do the const changes in a separate commit.

Lovely!

This revision is now accepted and ready to land.Jan 29 2021, 3:50 PM