Fix T96233: Crash with gpencil data with vertex groups
Blender crashes when a multi-user grease pencil object has vertex groups and is modified by modifiers, layer transform or parenting. The fix makes sure that we copy the vertex group names list. Reviewed By: antoniov Maniphest Tasks: T96233 Differential Revision: https://developer.blender.org/D14275
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "DNA_screen_types.h"
|
||||
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_gpencil.h"
|
||||
#include "BKE_gpencil_geom.h"
|
||||
#include "BKE_gpencil_modifier.h"
|
||||
@@ -632,6 +633,8 @@ static bGPdata *gpencil_copy_structure_for_eval(bGPdata *gpd)
|
||||
gpd_eval->mat = MEM_dupallocN(gpd->mat);
|
||||
}
|
||||
|
||||
BKE_defgroup_copy_list(&gpd_eval->vertex_group_names, &gpd->vertex_group_names);
|
||||
|
||||
/* Duplicate structure: layers and frames without strokes. */
|
||||
LISTBASE_FOREACH (bGPDlayer *, gpl_orig, &gpd->layers) {
|
||||
bGPDlayer *gpl_eval = BKE_gpencil_layer_duplicate(gpl_orig, true, false);
|
||||
|
||||
Reference in New Issue
Block a user