[Bf-blender-cvs] [867198780d1] soc-2017-vertex_paint: new color layer copies the color from current layer
Darshan Kadu
noreply at git.blender.org
Sun Aug 13 07:54:02 CEST 2017
Commit: 867198780d14149758b975652888babaa4d6e425
Author: Darshan Kadu
Date: Sun Aug 13 11:19:30 2017 +0530
Branches: soc-2017-vertex_paint
https://developer.blender.org/rB867198780d14149758b975652888babaa4d6e425
new color layer copies the color from current layer
===================================================================
M source/blender/editors/mesh/mesh_data.c
===================================================================
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 49ee6585296..772bb1bd308 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -442,8 +442,8 @@ int ED_mesh_color_add(Mesh *me, const char *name, const bool active_set)
}
if (me->mloopcol) {
- CustomData_add_layer_named(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, me->mloopcol, me->totloop, name);
- CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DEFAULT, me->mcol, me->totface, name);
+ CustomData_add_layer_named(&me->ldata, CD_MLOOPCOL, CD_DUPLICATE, me->mloopcol, me->totloop, name);
+ CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DUPLICATE, me->mcol, me->totface, name);
}
else {
CustomData_add_layer_named(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop, name);
More information about the Bf-blender-cvs
mailing list