static void vgroup_copy_active_to_sel(Object *ob) { EditVert *eve_act; MDeformVert *dvert_act; act_vert_def(ob, &eve_act, &dvert_act); if(dvert_act==NULL) { return; } else { Mesh *me= ob->data; EditMesh *em = BKE_mesh_get_editmesh(me); EditVert *eve; MDeformVert *dvert; int index= 0; for(eve= em->verts.first; eve; eve= eve->next, index++) { if(eve->f & SELECT && eve != eve_act) { dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT); if(dvert) { defvert_copy(dvert, dvert_act); if(me->editflag & ME_EDIT_MIRROR_X) editvert_mirror_update(ob, eve, -1, index); } } } } }
int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value) { if (UNLIKELY(!BPy_BMDeformVert_Check(value))) { PyErr_Format(PyExc_TypeError, "expected BMDeformVert, not a %.200s", Py_TYPE(value)->tp_name); return -1; } else { MDeformVert *dvert_src = ((BPy_BMDeformVert *)value)->data; if (LIKELY(dvert != dvert_src)) { defvert_copy(dvert, dvert_src); } return 0; } }