Page MenuHome

ViewLayer: Reduce object duplication syncing
ClosedPublic

Authored by Monique Dewanchand (mdewanchand) on Sep 5 2022, 9:38 PM.

Details

Summary

During object duplication the syncing is temporarily disabled.
With D15885: ViewLayer: Lazy sync of scene data. this isn't useful as when disabled the view_layer
is still accessed to locate bases. This can be improved by first
locating the source bases, then duplicate and sync and locate
the new bases.

This patch removes the resync forbid and improve the times
that resyncing actually must happen.

Diff Detail

Repository
rB Blender
Branch
temp-T73411-reduce-object-duplication-resyncing (branched from master)
Build Status
Buildable 24276
Build 24276: arc lint + arc unit

Event Timeline

Monique Dewanchand (mdewanchand) edited the summary of this revision. (Show Details)

Updated to latest master.
Fails when used.

  • Fix crash as syncing was still disabled.
Monique Dewanchand (mdewanchand) retitled this revision from [WIP] ViewLayer: Reduce object duplication syncing to ViewLayer: Reduce object duplication syncing.Sep 15 2022, 9:12 AM
Monique Dewanchand (mdewanchand) edited the summary of this revision. (Show Details)
Bastien Montagne (mont29) requested changes to this revision.Oct 13 2022, 3:12 PM

Minor notes below, otherwise looks good to me.

source/blender/editors/object/object_add.cc
3729

Think this call should be done once outside of the loop, and its result stored in a variable?

3739–3758

Don't think that last loop is needed, afaics its content can be put into the previous loop ?

3752–3754

why not just link.object_new here?

This revision now requires changes to proceed.Oct 13 2022, 3:12 PM
  • Resolve code review issues.
  • Merge branch 'master' into temp-T73411-reduce-object-duplication-resyncing

LGTM

source/blender/editors/object/object_add.cc
3747

Would at least assert that base_new is not null here?

This revision is now accepted and ready to land.Oct 17 2022, 11:43 AM
  • Added assert check on base new.
  • Merge branch 'master' into temp-T73411-reduce-object-duplication-resyncing