[Bf-blender-cvs] [25d4d434910] blender2.8: Modifiers: Restore duplication of referenced layers

Sergey Sharybin noreply at git.blender.org
Wed May 30 17:00:54 CEST 2018


Commit: 25d4d43491055c4c7c0a523a0ddb0bf027d1515d
Author: Sergey Sharybin
Date:   Wed May 30 16:18:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB25d4d43491055c4c7c0a523a0ddb0bf027d1515d

Modifiers: Restore duplication of referenced layers

Was no reason to remove those calls, it was always a plan to bring
referenced layers back eventually.

===================================================================

M	source/blender/modifiers/intern/MOD_normal_edit.c
M	source/blender/modifiers/intern/MOD_weightvgedit.c
M	source/blender/modifiers/intern/MOD_weightvgmix.c
M	source/blender/modifiers/intern/MOD_weightvgproximity.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c
index 67d20e1a52f..5ac6569ea1f 100644
--- a/source/blender/modifiers/intern/MOD_normal_edit.c
+++ b/source/blender/modifiers/intern/MOD_normal_edit.c
@@ -450,7 +450,7 @@ static Mesh *normalEditModifier_do(NormalEditModifierData *enmd, Object *ob, Mes
 	result->runtime.cd_dirty_vert &= ~CD_MASK_NORMAL;
 
 	if (use_current_clnors) {
-		clnors = CustomData_get_layer(ldata, CD_CUSTOMLOOPNORMAL);
+		clnors = CustomData_duplicate_referenced_layer(ldata, CD_CUSTOMLOOPNORMAL, num_loops);
 
 		BKE_mesh_normals_loop_split(mvert, num_verts, medge, num_edges, mloop, loopnors, num_loops,
 		                            mpoly, (const float (*)[3])polynors, num_polys,
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 7c71dd5159e..18d79966938 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -212,7 +212,7 @@ static Mesh *applyModifier(
 	        false);
 
 	if (has_mdef) {
-		dvert = CustomData_get_layer(&result->vdata, CD_MDEFORMVERT);
+		dvert = CustomData_duplicate_referenced_layer(&result->vdata, CD_MDEFORMVERT, numVerts);
 	}
 	else {
 		/* Add a valid data layer! */
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index 1736bb01951..eeaf292991f 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -253,7 +253,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
 	        false);
 
 	if (has_mdef) {
-		dvert = CustomData_get_layer(&result->vdata, CD_MDEFORMVERT);
+		dvert = CustomData_duplicate_referenced_layer(&result->vdata, CD_MDEFORMVERT, numVerts);
 	}
 	else {
 		/* Add a valid data layer! */
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 4549e60a8d8..52d94cfd76c 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -431,7 +431,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
 	        false);
 
 	if (has_mdef) {
-		dvert = CustomData_get_layer(&result->vdata, CD_MDEFORMVERT);
+		dvert = CustomData_duplicate_referenced_layer(&result->vdata, CD_MDEFORMVERT, numVerts);
 	}
 	else {
 		/* Add a valid data layer! */



More information about the Bf-blender-cvs mailing list