[867198780d1] soc-2017-vertex_paint: new color layer copies the color from current layer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[867198780d1] soc-2017-vertex_paint: new color layer copies the color from current layer

Sebastian Witt
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);

_______________________________________________
Bf-blender-cvs mailing list
[hidden email]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs
Loading...