Notifications
Clear all
[Closed] How select verts by Envelope in SKIN modifier?
Aug 29, 2009 2:07 am
In SKIN Edit Mode when I select a bone and change envelope radius, at the same time I want to select vertices affected by envelope. Can any script function acheive?
2 Replies
Aug 29, 2009 2:07 am
fn getVertsByBoneIDs skinMod arrSelectedBID = (
local numVerts = skinOps.GetNumberVertices skinMod
local nBones
local BID
local IncluNum = 0
local bArrAffectedVerts = #{}
for i = 1 to numVerts do (
nAffectedBns = skinOps.GetVertexWeightCount skinMod i
for j = 1 to nAffectedBns do (
BID = skinOps.GetVertexWeightBoneID skinMod i j
IncluNum = findItem arrSelectedBID BID
if IncluNum > 0 do (
append barrAffectedVerts i
)
)
)
bArrAffectedVerts
)
-- Get Bone ID 1,3,5 s' affected vertices in Skin Modifier
local bArr = getVertsByBoneIDs selection[1].skin #{1,3,5}
I already solved this question. Show you the code.
Aug 29, 2009 2:07 am
You do not need an additional script for that: there’s an accesible command that allows you to select vertices by bone in the Customize UI panel, under the ‘Skin Modifier’ category