Page MenuHome

Fix assert in original modifiers pointer update function
ClosedPublic

Authored by Sergey Sharybin (sergey) on Feb 2 2022, 1:01 PM.

Details

Summary

The issue was happening with a specific file where the ID management
code was not fully copying all modifiers because of the extra check
in the BKE_object_support_modifier_type_check().

While it is arguable that copy-on-write should be a 1:1 copy there is
no real need to maintain the per-modifier pointer to its original.
Use its SessionUUID to perform lookup in the original datablock.

Downside of this approach is that it is a linear lookup instead of
direct pointer access, but the upside is that there is less pointers
to manage and that the file with unsupported modifiers does behave
correct without any asserts.

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) requested review of this revision.Feb 2 2022, 1:01 PM
Sergey Sharybin (sergey) created this revision.

Indeed using session_uuid here makes sense to me... patch LGTM.

This revision is now accepted and ready to land.Feb 2 2022, 2:20 PM

Include the whole patch.

THe initial code review only included the last commit out of 3.
First two weer some cleanup and preparation, without functional changes.