Hello.
So, I posted a similar thread like this a few days ago. I apologize for the strong similarities. I've managed to progress further, thanks to Klunk's code. But, I'm running into some more trouble that I unfortunately cannot resolve. I've already looked into this for several hours, and still cannot get it working as expected. I'm not sure that the code here actually gets all of the vertices from a model - as it's crucial that I need to return even the dead vertices within a model - which doesn't seem to be happening. Perhaps I'm using the function incorrectly. But, I don't think I am as it is returning some of the vertices. Keep in mind, all of the vertices must be connected to a bone - even if they are dead. Does anyone have any other ideas for this particular problem? I'm truly stumped.
Here's Klunk's code:
fn CollectAllVertsOnlyInfluencedByBone skin_mod bone_index =
(
num_verts = skinOps.GetNumberVertices skin_mod;
for v = 1 to num_verts where skinOps.GetVertexWeightCount skin_mod v == 1 and
skinOps.GetVertexWeightBoneID skin_mod v 1 == bone_index collect v;
)
Replies
In Max 2018 and older you need to have the Skin Modifier showing in the Modify Panel.
I apologize for the late reply. I'm using Max 2017. All of that code works except for, "skinOps.GetSelectedVertices". I get an exception error when I try and run it. The code isn't highlighted, either. Is there another way to get the selected bones with a custom function?
Other than that - this is good. I appreciate it.
You can use this function:
I should consider looking into the newer version of Max at some point.
It's nice that there are still ways of programming for older Maxscript. But, I'm beginning to see why it would be better to move on.