Notifications
Clear all

[Closed] Copy weight table

I want to link the root bone to the skined mesh, but unfortunatelly 3ds max don´t let me do so, it shows some billsh*t about dependency loop. If I am linking the root bone to a mesh without skin and adding skin modifier after that there is no problem. However I don´t want to do all the skin weights from scratch. I tried something like this:

mySkin=myMesh.modifiers["skin"]
deleteModifier myMesh (myMesh.modifiers["skin"])
myBone.parent=myMesh
addModifier myMesh mySkin

The code can have a lot of errors, since I am writing from memory. After execution of this code the root bone is linked to mesh, but the weight table is mising, so I have to make it again from scratch. Is there a way to make a copy of the old weight table and apply it to the mesh again?

28 Replies
1 Reply
(@denist)
Joined: 10 months ago

Posts: 0

Actually by giving this warning the MAX prevents you to do “bullsh*t”.

Think yourself… the skin stores its local data initialized to hierarchy at the moment of the skin modifier been applied. Now you want to change it on-the-fly. Maybe you need to delete the current Skin and reapply it?

Nah I was tallking exactly about delete the current Skin and reapply it. Unfortunatelly the weight table is geting lost, so when I reapply the skin it´s useles as al weight are mising.

the way you try to reapply is wrong.

myMesh.modifiers["skin"]=undefined

it doesn’t make sense

I already said that my code can have a lot of errors, as I was writing from memory and this line was defenetly wrong. I have fixed that line in my first post.

Why would you need to link the root to the mesh, which is skinned to the root?
Seems more a case of you are trying to solve your problem incorrectly.

Max could not ask this question, and therefore gave only politically correct warning

I wouldn´t call it warning, as warnings can simply be ignored and unfortunately I can´t do it here.
The answer to the question why I need to link the root bone to the skined mesh is simple, the game engine wants it so. Also I see no problem in linking the root bone to the skined mesh, as I can link the root bone to the mesh befor it was skined and do all the skining stuff after that. I defenetly have never noticed any kind of loops when doing so. Even all animations worcked fine.
However I really don´t want to argue about all this stuff. All I need to know is if there is a way to copy the skin modifier from a mesh with the correspondin weight table? In some old thread here I read that Skin_Wrap modifier could be helpfull but there was no explanation how and after taking a look on documentation of Skin_Wrap modifier it makes no real sence for me, but that has nothing to say, as my maxscript knowledge is minimal.

But how can I do that?

You can copy skin modifier (or “modified object skin” if you take look where should be looking when animating), delete it, link whatever, than paste it to yours mesh…
Although that hierarchy make no sense in Max (actually no sense at all)

How could you expect to bring back skinning information with “empty” skin modifier!?

Page 1 / 3