Fix T66835: Dynamic Paint weight group isn't updated unless weight has been assigned

The dvert layer was not assigned to the mesh data if it had to be
created by the dpaint modifier.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5263
This commit is contained in:
Sebastian Parborg 2019-07-16 11:42:03 +02:00
parent 6b3c1192e1
commit c4a62493de
Notes: blender-bot 2023-02-14 05:43:04 +01:00
Referenced by issue #66835, Dynamic Paint weight group isn't updated unless weight has been assigned
1 changed files with 2 additions and 0 deletions

View File

@ -2023,6 +2023,8 @@ static Mesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Object *
if (defgrp_index != -1 && !dvert && (surface->output_name[0] != '\0')) {
dvert = CustomData_add_layer(
&result->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, sData->total_points);
/* Make the dvert layer easily accessible from the mesh data. */
result->dvert = dvert;
}
if (defgrp_index != -1 && dvert) {
int i;