Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/armature_deform.c
| Show First 20 Lines • Show All 495 Lines • ▼ Show 20 Lines | static void armature_deform_coords_impl(const Object *ob_arm, | ||||
| if ((ob_arm->pose->flag & POSE_RECALC) != 0) { | if ((ob_arm->pose->flag & POSE_RECALC) != 0) { | ||||
| CLOG_ERROR(&LOG, | CLOG_ERROR(&LOG, | ||||
| "Trying to evaluate influence of armature '%s' which needs Pose recalc!", | "Trying to evaluate influence of armature '%s' which needs Pose recalc!", | ||||
| ob_arm->id.name); | ob_arm->id.name); | ||||
| BLI_assert(0); | BLI_assert(0); | ||||
| } | } | ||||
| if (ELEM(ob_target->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) { | if (BKE_object_supports_vertex_groups(ob_target)) { | ||||
| /* get the def_nr for the overall armature vertex group if present */ | /* get the def_nr for the overall armature vertex group if present */ | ||||
| armature_def_nr = BKE_object_defgroup_name_index(ob_target, defgrp_name); | armature_def_nr = BKE_object_defgroup_name_index(ob_target, defgrp_name); | ||||
| defbase_len = BKE_object_defgroup_count(ob_target); | defbase_len = BKE_object_defgroup_count(ob_target); | ||||
| if (ob_target->type == OB_MESH) { | if (ob_target->type == OB_MESH) { | ||||
| if (em_target == NULL) { | if (em_target == NULL) { | ||||
| Mesh *me = ob_target->data; | Mesh *me = ob_target->data; | ||||
| Show All 11 Lines | else if (ob_target->type == OB_LATTICE) { | ||||
| } | } | ||||
| } | } | ||||
| else if (ob_target->type == OB_GPENCIL) { | else if (ob_target->type == OB_GPENCIL) { | ||||
| dverts = gps_target->dvert; | dverts = gps_target->dvert; | ||||
| if (dverts) { | if (dverts) { | ||||
| dverts_len = gps_target->totpoints; | dverts_len = gps_target->totpoints; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| /* get a vertex-deform-index to posechannel array */ | /* get a vertex-deform-index to posechannel array */ | ||||
| if (deformflag & ARM_DEF_VGROUP) { | if (deformflag & ARM_DEF_VGROUP) { | ||||
| if (ELEM(ob_target->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) { | |||||
| /* if we have a Mesh, only use dverts if it has them */ | /* if we have a Mesh, only use dverts if it has them */ | ||||
| if (em_target) { | if (em_target) { | ||||
| cd_dvert_offset = CustomData_get_offset(&em_target->bm->vdata, CD_MDEFORMVERT); | cd_dvert_offset = CustomData_get_offset(&em_target->bm->vdata, CD_MDEFORMVERT); | ||||
| use_dverts = (cd_dvert_offset != -1); | use_dverts = (cd_dvert_offset != -1); | ||||
| } | } | ||||
| else if (me_target) { | else if (me_target) { | ||||
| use_dverts = (me_target->dvert != NULL); | use_dverts = (me_target->dvert != NULL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines | |||||