Commit: 705776db1fbaa5a7563d7efae89f0c984afdea6d
Author: Campbell Barton
Date:   Tue Sep 1 02:48:28 2015 +1000
Branches: master
https://developer.blender.org/rB705776db1fbaa5a7563d7efae89f0c984afdea6d

Fix T45954: Inset w/ interpolated vertex color

Accumulating ubyte color was overflowing.

Thanks to @mont29 for suggested fix.

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

M       source/blender/bmesh/operators/bmo_inset.c

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

diff --git a/source/blender/bmesh/operators/bmo_inset.c 
b/source/blender/bmesh/operators/bmo_inset.c
index 6664bf6..f55a62e 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -208,18 +208,11 @@ static void bm_loop_customdata_merge(
                         */
                        const void *data_src;
 
-                       CustomData_data_add(
+                       CustomData_data_mix_value(
                                type,
                                BM_ELEM_CD_GET_VOID_P(l_a_inner_inset, offset),
-                               BM_ELEM_CD_GET_VOID_P(l_b_inner_inset, offset));
-                       CustomData_data_multiply(
-                               type,
-                               BM_ELEM_CD_GET_VOID_P(l_a_inner_inset, offset),
-                               0.5f);
-                       CustomData_data_copy_value(
-                               type,
-                               BM_ELEM_CD_GET_VOID_P(l_a_inner_inset, offset),
-                               BM_ELEM_CD_GET_VOID_P(l_b_inner_inset, offset));
+                               BM_ELEM_CD_GET_VOID_P(l_b_inner_inset, offset),
+                               CDT_MIX_MIX, 0.5f);
 
                        /* use this as a reference (could be 'l_b_inner_inset' 
too) */
                        data_src = BM_ELEM_CD_GET_VOID_P(l_a_inner_inset, 
offset);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to