$weightlist: Difference between revisions
Jump to navigation
Jump to search
Note:No, this has nothing to do with physical weight or mass.
Warning:Opening bracket must be on the same line as $weighlist
m (adding this because apparently someone elsewhere on the wiki read this article and did not gather the information included in the note) |
NvC DmN CH (talk | contribs) m (Opening bracket must be on the same line as $weighlist) |
||
| Line 7: | Line 7: | ||
== Usage == | == Usage == | ||
{{warning|Opening bracket must be on the same line as $weighlist}} | |||
<source lang=php> | <source lang=php> | ||
$weightlist my_weightlist | $weightlist my_weightlist { | ||
{ | |||
<bone> <weight> | <bone> <weight> | ||
<bone> <weight> | <bone> <weight> | ||
| Line 21: | Line 21: | ||
<source lang=php> | <source lang=php> | ||
$weightlist no_hands | $weightlist no_hands { | ||
{ | |||
"Bip01_Pelvis" 1.0 | "Bip01_Pelvis" 1.0 | ||
"Bip01_LHand" 0.0 | "Bip01_LHand" 0.0 | ||
Revision as of 23:47, 4 May 2020
$weightlist defines the degree to which each bone in a model is affected by a $sequence or $animation. For example, you could set the weight of the leg bones to 0 to only animate the top half of the skeleton.
A $weightlist can be reused as many times as is needed. It must come above anything that uses it in the QC.
Usage
$weightlist my_weightlist {
<bone> <weight>
<bone> <weight>
...
}
$sequence my_weighted_anim "my_anim.smd" weightlist my_weightlist
Bones inherit weight from their parents, and all root bones start with a weight of 0.
$weightlist no_hands {
"Bip01_Pelvis" 1.0
"Bip01_LHand" 0.0
"Bip01_RHand" 0.0
}
$weightlist head_and_arms "Bip01_Spine2" 1.0
$Weightlist UpperbodyBlend {
"Bip01_Pelvis" 0.1
"Bip01_L_Thigh" 0.0
"Bip01_R_Thigh" 0.0
"Bip01_Spine" 0.2
"Bip01_Spine1" 0.4
"Bip01_Spine2" 0.6
"Bip01_Spine4" 0.4
"Bip01_L_Clavicle" 0.8
"Bip01_L_Upperarm" 1.0
"Bip01_R_Clavicle" 0.8
"Bip01_R_Upperarm" 1.0
}