when duplicating and mirroring an armature (a human harm and hand, for example), you can automatically flip all the Bones names from Left to Right or Right to Left : Blender allows to converts Bone. L to Bone.R for all bones.
Then, you have to flip also all the names of the vertex groups. When you have a complicated rig, and over all if you restart several times from scratch to improve your rig, you have to change each time all the vertex groups names by hand. It is tedious.
Is there a feature (or a script) that I haven’t yet discovered to change in one time all vertex groups names from .L to .R and .R to L ?
I haven’t find anything about this in the Wiki manual as well as on the forum…
Thank you in advance.
You’ve missed one spot
Thank you for your answer… I had already checked this script, but I cant get it work !
I have tried to use every setting, but no change at all occurs on my mesh and its vertex groups… :no:
I have tried to run the script with the mesh in Object mode and in edit mode as well.
One time I have got a flipped copy (renamed from .L to .R) of one of the vertex groups only, not much.
I have tried it with Blender v2.47 and v 2.45, in order to check if it was a problem with a recent release… without any success.
Could you try the script an tell me if the groups name are flipped on your system ?
I’m running Blender under Windows XP SP2.
The script works fine for me.
I don’t think it depentds of the operating system nor the Python installed.
If you have the vertex groups named properly with .L(.R) extension just enter edit mode and select all vertices. Then run the script.
In the appeared menu enable Mirror Weights.
Also the direction is important! For example if the v.groups are placed to the left side of the screen check Left>Right button, if they are placed to the right side - check Right>Left button.
After pressing OK the script calculates the vertex positions and mirrors and renames the existing v.groups (and the weights they have). In the end script will select the vertices that haven’t been changed. If nothing is selected that means everything is completed sucsessfully.
Try with some simple object first. You don’t have to add Armature for this script to work. The only rule is that your model has to have X axis symmetry.
I hope this helps!
Well, I have tested with a simple subdivided plane made of 4 vertex groups, and I have got some weird results…
I think that the script can’t do what I need.
I dont want to flip the vertex groups. I only want to flip the names of the groups :
Convert Group.L to Group.R or the opposite, without changing anything in the mesh, because in my process, the meshes are already mirrored.
Well if the model is perfectly symetrical just mirror the whole mesh (flip it) along the x axis. All mirror groups will exchange their places
The model is not symetrical : the model is an arm with hand, not a full character.
I need to change the group names on a copy of the mesh.
Though, I can duplicate/mirror the vertices inside the mesh, mirror the names and groups and delete the initial unwanted side…
I have tried it : it is necessary to delete by hand all the previous group names, because they are not erased when you delete the unwanted half of the duplicated/mirrored mesh. Added to the mirroring-duplicating operation and script loading and setting, it is at least as long as renaming all the groups by hand, with a risk of making errors and damaging the mesh…
it is necessary to delete by hand all the previous group names
You can clean the mesh from unused vertex groups:
Mesh -> Scripts-> Clean Meshes -> VGroup Clean
If you have a few vgroups then manually renaming them is faster. If you have 50 vgroups you can PM me with the blend file so I can rename them for you
Of course it could be made by script. I found that there is a direct function for that in Module Mesh :: Class Mesh:
A good Python programmer coud make a simple script in no time.
Well, I update this message, because Syziph has built a Python script doing exactly what I needed :
Just renaming Vertex groups from .L to .R and .R to .L .
I have hosted it here :
Put this script in youBlender/Script directory. It will be available in Blender in the Script/Mesh menu.
1 - Select your mesh.
2 - Select the script in the Script/Mesh menu, and it is done, vertex groups names are flipped !
Thank you very much Syziph !