Wasn't somewhere a Copyvertexgroups script?

I remember I saw it somewhere… but I can’t find it anymore. It was intended to copy the vertex groups from a rigged model to a copy of it still without vertex groups. Very useful if you use the “Fixfromarmature” script to edit meshes deformation (this script doesn’t preserve the vertex groups in the duplicated-deformed mesh).
So, if someone knows where to find it, thanks a lot. :slight_smile:

EnV

Why do you not use the apply_deform.py one ?

Ah yes, I actually meant the “Apply_deform” script, but it doesn’t preserve the vertex groups in the copy mesh as well…

EnV

Perhaps because you try to make a copy of subsurfaced mesh .

Here is the version in cvs which does copy vertex groups and weights:

http://projects.blender.org/viewcvs/viewcvs.cgi/blender/release/scripts/Apply_def.py?rev=1.5&cvsroot=bf-blender&content-type=text/vnd.viewcvs-markup

Jms, no, really, I used it on a not subsurfaced mesh and it keeps the vertex groups names only in the selection popup, but no vertices to select in the mesh.
Toloban, thanks for the link, I’ll try it. But isn’t this the same version that came with every Blender script package?

EnV

Sorry, as toloban, I was thinking about the actual cvs version .

No, it is different. On another thread someone posted a modified version and Theeth himself was the one to mention about the cvs script, so his is the official script.

Look at these lines:


        # If SubSurf is off on the original, copy the vertex weight
        if not ob_mesh.getMode() & Blender.NMesh.Modes['SUBSURF']:
            for vgroupname in ob_mesh.getVertGroupNames():
                vlist = ob_mesh.getVertsFromGroup(vgroupname, True)
                new_ob_mesh.addVertGroup(vgroupname)
                for vpair in vlist:
                    new_ob_mesh.assignVertsToGroup(vgroupname, [vpair[0]], vpair[1], 'add')

Ah! Perfect, thanks!

EnV

New version of the fixfromarmature script :
http://jmsoler.free.fr/util/blenderfile/py/fixfromarmature.py