fixed [#32373] Copy Vertex Group operator copies any value as full 1.0
authorCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2012 15:57:59 +0000 (15:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2012 15:57:59 +0000 (15:57 +0000)
source/blender/editors/object/object_vgroup.c

index b7977c23010c9e51351d970e6871e2c4726ff2d3..c4616fc39c6166ba01b967af5bbf5674ef15815b 100644 (file)
@@ -686,8 +686,9 @@ static void vgroup_duplicate(Object *ob)
                        dw_org = defvert_find_index(dv, idg);
                        if (dw_org) {
                                /* defvert_verify_index re-allocs org so need to store the weight first */
+                               const float weight = dw_org->weight;
                                dw_cpy = defvert_verify_index(dv, icdg);
-                               dw_cpy->weight = dw_org->weight;
+                               dw_cpy->weight = weight;
                        }
                }