Commit: b2a5da96b7fb14997a1c69809ec55861ec62e61d
Author: Hans Goudey
Date:   Wed Aug 31 17:01:49 2022 -0500
Branches: refactor-mesh-remove-pointers
https://developer.blender.org/rBb2a5da96b7fb14997a1c69809ec55861ec62e61d

Fix active layer retrieval

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

M       source/blender/editors/mesh/mesh_data.cc

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

diff --git a/source/blender/editors/mesh/mesh_data.cc 
b/source/blender/editors/mesh/mesh_data.cc
index f41a5128c5c..09673b3d7ad 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -404,7 +404,7 @@ int ED_mesh_color_add(Mesh *me,
   else {
     layernum = CustomData_number_of_layers(&me->ldata, CD_PROP_BYTE_COLOR);
 
-    if (CustomData_get_active_layer(&me->ldata, CD_PROP_BYTE_COLOR) && 
do_init) {
+    if (CustomData_get_active_layer(&me->ldata, CD_PROP_BYTE_COLOR) != -1 && 
do_init) {
       CustomData_add_layer_named(&me->ldata,
                                  CD_PROP_BYTE_COLOR,
                                  CD_DUPLICATE,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to