Page MenuHome

Fix T96145: GPencil eval data not updated correctly
ClosedPublic

Authored by Falk David (filedescriptor) on Mar 3 2022, 11:47 AM.

Details

Summary

When removing a modifier, changing the layer transform or updating
the parent of a grease pencil object that has a multi-user datablock
and animation data, the eval data is not updated properly (after a
frame change). This can also cause memory leaks.

The fix makes sure that we free and reset any runtime copy
(ob->runtime.gpd_eval) in BKE_gpencil_prepare_eval_data.

Note: As far as we can tell, ob->runtime.gpd_orig is unused and could
be removed. The assignment in BKE_gpencil_prepare_eval_data
seemed to be unnecessary.

Co-authored-by: @Yann Lanthony (yann-lty)

Diff Detail

Repository
rB Blender

Event Timeline

Falk David (filedescriptor) requested review of this revision.Mar 3 2022, 11:47 AM
Falk David (filedescriptor) created this revision.

I see that you remove always the data before...this is best that the old method to delete only if the datablock was multiuser.

This revision is now accepted and ready to land.Mar 3 2022, 12:34 PM
  • Merge branch 'master' into T96145