Page MenuHome

Fix T76970: Unneccessary update calls viewport
ClosedPublic

Authored by Jeroen Bakker (jbakker) on May 25 2020, 10:48 AM.

Details

Summary

Due to recent changes clicks in the node editor would trigger a
depsgraph update resulting in too many redraws. This patch limits
the updates to when workbench shown in texture mode in any visible
screen.

There are still cases where too many updates are created. For example when
there are a Cycles render viewport and a Workbench texture viewport on the
same screen.

This fix is meant as a workaround. The actual fix should add a mechanism
to the depsgraph and the viewports should check if they need to be redrawn.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.May 25 2020, 10:48 AM
Jeroen Bakker (jbakker) created this revision.
Jeroen Bakker (jbakker) planned changes to this revision.May 25 2020, 10:55 AM

Check for actual change of active texture

Check that active texture changes

source/blender/editors/space_node/node_select.c
63

Any suggestion for a better place to have these kind of functions.
ed_query

This isn't really what I intended with my comment. It's not the node editor that should be checking which 3D viewports are visible, but rather the 3D viewports should update or not update depending on the depgraph tag or notifier and its own display settings.

But it might be ok as a workaround for 2.83 since depsgraph changes here are risky.

source/blender/editors/space_node/node_edit.c
1293

|| -> |

Jeroen Bakker (jbakker) planned changes to this revision.May 25 2020, 3:19 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)

Add comments

Jeroen Bakker (jbakker) updated this revision to Diff 25085.EditedMay 25 2020, 7:24 PM

@Brecht Van Lommel (brecht): I don't have a clear view how that could look like. Are there similar cases or do we need to create a new mechanism for this?

My plan would be to use this patch for b2.83 and revert it in b2.90 so we can work on the actual fix.

I don't know the full solution myself, I would need to dig into this code and potentially make some deeper changes. Probably we need to add a select and/or active texture component to datablocks in the depsgraph, similar to what exists for geometry. I might also do more work on the Cycles side, so we can detect when the effective node graph changes.

I suggest to commit this to 2.83. Don't revert it for 2.90, but leave the bug report open at normal priority and change the description to indicate cases where it's still doing too many updates (having both a Cycles render viewport and a viewport with workbench textures).

This revision is now accepted and ready to land.May 25 2020, 7:43 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)May 26 2020, 8:27 AM