fix [#33806] weight paint crash and computer freeze when painting

clear weight paint runtime data on file-load.
This commit is contained in:
Campbell Barton
2013-01-09 04:17:53 +00:00
parent e24443b79a
commit 02f6645bef

View File

@@ -5124,6 +5124,16 @@ static void direct_link_scene(FileData *fd, Scene *sce)
sce->toolsettings->imapaint.paintcursor = NULL;
sce->toolsettings->particle.paintcursor = NULL;
/* in rare cases this is needed, see [#33806] */
if (sce->toolsettings->vpaint) {
sce->toolsettings->vpaint->vpaint_prev = NULL;
sce->toolsettings->vpaint->tot = 0;
}
if (sce->toolsettings->wpaint) {
sce->toolsettings->wpaint->wpaint_prev = NULL;
sce->toolsettings->wpaint->tot = 0;
}
}
if (sce->ed) {