Fix T61759: Dynamic paint smudge crash
The issue was caused by mesh needed for dynamic paint brush being stored in the modifier. That make it to be freed and set to NULL when running copy-on-write. Solved by moving the mesh to be stored in modifier's runtime data.
This commit is contained in:
@@ -5590,7 +5590,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
|
||||
if (pmd->canvas) {
|
||||
pmd->canvas = newdataadr(fd, pmd->canvas);
|
||||
pmd->canvas->pmd = pmd;
|
||||
pmd->canvas->mesh = NULL;
|
||||
pmd->canvas->flags &= ~MOD_DPAINT_BAKING; /* just in case */
|
||||
|
||||
if (pmd->canvas->surfaces.first) {
|
||||
@@ -5613,7 +5612,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
|
||||
pmd->brush->psys = newdataadr(fd, pmd->brush->psys);
|
||||
pmd->brush->paint_ramp = newdataadr(fd, pmd->brush->paint_ramp);
|
||||
pmd->brush->vel_ramp = newdataadr(fd, pmd->brush->vel_ramp);
|
||||
pmd->brush->mesh = NULL;
|
||||
}
|
||||
}
|
||||
else if (md->type == eModifierType_Collision) {
|
||||
|
Reference in New Issue
Block a user