History Luke Hares has written a BoneWeight Copy script for Blender-2.59 and posted it on blenderartists.org I found a potential bug which can cause that the initialised attributes may be lost during a blender session. When that happens, the script will get unusable and yield some errors about “BWC… not found”.
I fixed that problem and added some more functionality to that script for our SL issues which otherwise might cause problems (like missing bones) or copy “unneeded” data (like Morph shapes).
You can download the modified script from our download server: space_view3d_copy_bone_weight_enhanced.py
History:
18-jan-2012: fixed compatibility issue with Blender 2.62
02-Sep-2011: Added extra features
31-aug-2011:Fixed Compatibility issue with Blender 2.59
Installation
Get Blender 2.60 or newer
start it fresh (to default start screen)
Open User preferences
Switch to the AddOns Tab
Select category “3D View”
Locate “Copy Bone Weights”
Enable the check mark on the right.
Save As Default
Now you find Bone Weight Copy in the Tool Shelf, whenever you have selected an Object which has weighted vertex groups.
Hint: If you do not find the Copy Bone Weight Script in your Blender distribution, you can always get it from one of the links above (note: it works only for Blender 2.59 and newer)
Usage
Ensure that your Model (the target) and the model from where you want to copy the weights (the source) are both visible.
Select your model (the target)
Go to edit mode and select all vertices which shall be weighted (in most cases all vertices)
Go to Object mode
Select the Source (From where the weights shall be copied)
In the weight copy panel select Interpolation: 2 and check both options (“Only Named Bones” and “Copy Empty Groups”
Copy Bone Weights
Copy from multiple targets
Many example files for Second Life use a Character with three separated parts (head, upper body, lower body). You can do a weight copy from those characters as follows:
Copy the Head part:
Select your target mesh and enter edit mode
Select only the vertices of the head part
Now go to object mode, select your target meshm then the head of the source mesh.
In the weight copy panel select Interpolation: 2 and check both options (“Only Named Bones” and “Copy Empty Groups”
Proceed in the same way with the upper body:
Select your target mesh and enter edit mode
Select only the vertices of the upper body part
Now go to object mode, select your target mesh, then the upper body of the source mesh.
In the weight copy panel select Interpolation: 2 and check both options (“Only Named Bones” and “Copy Empty Groups”
And finally do it again for the lower body in exactly the same way:
Select your target mesh and enter edit mode
Select only the vertices of the lower body part
Now go to object mode, select your target mesh, then the lower body of the source mesh.
In the weight copy panel select Interpolation: 2 and check both options (“Only Named Bones” and “Copy Empty Groups”
Now your target object should be weighted.
The control Parameters
Interpolation: When > 0 tries to find better matching weights by subdividing the meshes (the interpolation value is the number of subdivisions used for the interpolation) and thus having more accurate surface matching.
Only Named Bones: When checked, only those weight groups get copied for which the armature has bones. For avatar.blend that means, only the weights for the bones are copied. All weights in the morph groups are ignored. Note that empty groups will not be copied (see next feature)
Copy empty Groups: When checked, also empty weight groups will be created on the target object(s).
Hint for mesh makers
If you use avatar.blend or any skeleton which defines the vertext groups for the default Morph shapes, then you may want to check “Only Named Bones” this ensures, that the target object will get only the bone’s weight groups.
Import issues?
If you can not upload your mesh, then this may be caused by not having defined weight groups for all bones in your object.If your source object can be imported to Second Life, but your target object can not, then you will want to check “Copy empty Groups” because that will ensure that all weight groups for all bones are transfered to the target object.
Feedback
Please send any feedback, if it does not work or behaves wrong.Many thanks to all involved people who have helped me to get this done so quickly. Have fun, Gaia
Thanks
Special thanks to the original script author (Luke Hares) and to Domino Marama, who has helped me to jump start into blender-2.5 GUI programming. And many thanks to the Blender developers on the Blender IRC.