Notifications
Clear all
[Closed] function for selecting skin verts by bone?
Apr 15, 2006 2:36 pm
Title says it all really, I’m trying to quickly select all verts affected by a particular bone in the skin modifier.
Any help would be appreciated!
3 Replies
Apr 15, 2006 2:36 pm
fn getAffectedVerts skinMod boneID=
(
vertAr=#()
numVerts=skinOps.getNumberVertices skinMod
for i = 1 to numVerts do
(
numBoneAffectVert=skinOps.GetVertexWeightCount skinMod i
for boneNum = 1 to numBoneAffectVert do
(
sysBoneID=skinOps.GetVertexWeightBoneID skinMod i boneNum
if sysBoneID==boneID then append vertAr i
)
)
vertAr
)
fn selectAffectedVerts obj=
(
boneIndex=skinOps.getSelectedBone obj.skin
affectedVerts=getAffectedVerts obj.skin boneIndex
skinOps.selectVertices obj.skin affectedVerts
)
Apr 15, 2006 2:36 pm
Brilliant, thanks Paul, I was almost there, but your code has cleared up where I was going wrong.
Thanks again.