$weightlist

From Valve Developer Community
Revision as of 16:25, 28 April 2008 by JeffLane (talk | contribs) (cleanup and more info)
Jump to navigation Jump to search

Creates a named list of boneweights that can be used by animations that are intended to be blended on top of other animations.

The weightlist is built assuming that the root bone has a weight of 0, and that all child bones inherit the weight of their closest specified parent bone. This means that you only have to specify weights when they change, not for each and every bone in the list.

All animations default to a weightlist that assumes all bones have a weight of 1.0.

Syntax

$weightlist <weightlist name> <bone name> <weight> [[<bone name> <weight>] ....]

Example

Include all the bones, except the hands:

$weightlist no_hands "Bip01" 1.0 "Bip01 L Hand" 0.0 "Bip01 R Hand" 0.0

Include all the bones starting at the top of the root bone to the clavicle and neck:

$weightlist head_n_arms "Bip01 Spine 2" 1.0

Create a list that smoothly blends in the upper body, not becoming 100% until it reaches the arms:

$Weightlist UpperbodyBlendPose {
	"ValveBiped.Bip01_Pelvis" 0.1 
	"ValveBiped.Bip01_L_Thigh" 0.0 
	"ValveBiped.Bip01_R_Thigh" 0.0 
	"ValveBiped.Bip01_Spine" 0.2 
	"ValveBiped.Bip01_Spine1" 0.4 
	"ValveBiped.Bip01_Spine2" 0.6 
	"ValveBiped.Bip01_Spine4" 0.4
	"ValveBiped.Bip01_L_Clavicle" 0.8
	"ValveBiped.Bip01_L_Upperarm" 1.0
	"ValveBiped.Bip01_R_Clavicle" 0.8
	"ValveBiped.Bip01_R_Upperarm" 1.0
}

Only the bones with a weight > 0 will have any influence over the animation.