Fix #118509: GPv3: fix broken drawing array compression function #120433

Merged
Lukas Tönne merged 4 commits from LukasTonne/blender:gp3-fix-remove-unused-drawings into main 2024-04-10 18:23:43 +02:00

4 Commits

Author SHA1 Message Date
Lukas Tönne d743c866e5 Early exit to avoid looping over layers if nothing is removed.
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
2024-04-10 15:41:18 +02:00
Lukas Tönne 41b2fe2c8d Cleanup: use iterator helper function for a nicer loop. 2024-04-10 15:36:45 +02:00
Lukas Tönne d30741bc0a Comment and constexpr variable for -1 entries in the drawing index map. 2024-04-10 15:28:41 +02:00
Lukas Tönne e298ef0cfc Fix #118509: Refactored the GPv3 drawing array compression function.
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
The `remove_drawings_with_no_users` did not work properly when removing
more than one drawing at a time. It created incorrect drawing indices
that were larger than the drawings array, causing crashes down the line.

The new implementation should be both cleaner and more efficient,
avoiding a loop over all frames for every drawing removed.
2024-04-09 16:04:57 +02:00