Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/armature_skinning.c
| Show First 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | static void add_verts_to_dgroups( | ||||
| /* create verts */ | /* create verts */ | ||||
| mesh = (Mesh *)ob->data; | mesh = (Mesh *)ob->data; | ||||
| verts = MEM_callocN(mesh->totvert * sizeof(*verts), "closestboneverts"); | verts = MEM_callocN(mesh->totvert * sizeof(*verts), "closestboneverts"); | ||||
| if (wpmode) { | if (wpmode) { | ||||
| /* if in weight paint mode, use final verts from evaluated mesh */ | /* if in weight paint mode, use final verts from evaluated mesh */ | ||||
| Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); | Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); | ||||
| Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); | Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); | ||||
| Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, CD_MASK_BAREMESH); | Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, &CD_MASK_BAREMESH); | ||||
| BKE_mesh_foreach_mapped_vert_coords_get(me_eval, verts, mesh->totvert); | BKE_mesh_foreach_mapped_vert_coords_get(me_eval, verts, mesh->totvert); | ||||
| vertsfilled = 1; | vertsfilled = 1; | ||||
| } | } | ||||
| else if (modifiers_findByType(ob, eModifierType_Subsurf)) { | else if (modifiers_findByType(ob, eModifierType_Subsurf)) { | ||||
| /* is subsurf on? Lets use the verts on the limit surface then. | /* is subsurf on? Lets use the verts on the limit surface then. | ||||
| * = same amount of vertices as mesh, but vertices moved to the | * = same amount of vertices as mesh, but vertices moved to the | ||||
| * subsurfed position, like for 'optimal'. */ | * subsurfed position, like for 'optimal'. */ | ||||
| ▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines | |||||