From Valve Developer Community
Jump to: navigation, search
It defines attachments on a model. Attachments are identified by their name, and can be either relative to the model's origin or parented to a bone.

See also Attachments.


$attachment <string|name> <string|parent bone> <Vector|offset> [absolute] [rigid] [rotate <angle|orientation>]

The optional commands are:

Parented to the model's origin. The offset is still relative to the given parent bone, however!
Declares that the bone this attachment is parented to will not move, allowing Studiomdl to optimise it out. Used to convert bones created in a modelling package into attachments.
Rotates the attachment, in degrees, relative to its parent bone / the origin.
Blank image.pngTodo: There is some weirdness in how the value is interpreted by Studiomdl.
flag the attachment as should align to world and not to it own root.
Blank image.pngTodo: this need more test.
alike rotate but only Y axis remain at default value.
Blank image.pngTodo: Need test. Why this exists? looks useless


Relative to bone:

$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00

Relative to origin (no bone name required):

$attachment "nozzle" "" 0 4.8 0 absolute