$body: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(there can only be one mesh inside an SMD - KISS!)
mNo edit summary
Line 1: Line 1:
The [[$body]] [[QC command]] is used to define a [[reference mesh]]. Without at least one $body the model will not be rendered.
The [[$body]] [[QC command]] is used to define a [[reference mesh]] [[Studiomdl Data|SMD]]. Without at least one $body the model will not be rendered.


{{tip|Models with [[facial animation]] use <code>[[$model (QC)|$model]]</code>.}}
{{tip|Models with [[facial animation]] use <code>[[$model (QC)|$model]]</code>.}}
Line 29: Line 29:
*[[$model (QC)|$model]]
*[[$model (QC)|$model]]


[[Category:QC Commands|B]]
[[Category:QC Commands|body]]

Revision as of 10:30, 3 May 2008

The $body QC command is used to define a reference mesh SMD. Without at least one $body the model will not be rendered.

Tip.pngTip:Models with facial animation use $model.
Note.pngNote:Reference meshes co-exist by default, rather than replacing each other. See $bodygroup.

Syntax

$body	<name> "<reference mesh SMD>"

where :

<name>
A label for this $body to distinguish it from other reference meshes (if there are any).
<reference smd>
Path to and name of the 'reference' (sometimes 'model') SMD relative to the QC file's current directory. The .smd extension is optional, but helps make the QC file easier to read.

Example

$modelname		"weapons/shell.mdl"
$cdmaterials		"models/weapons/"
$body		shell	"shell_ref.smd"
$sequence	idle	"shell_idle.smd"

See also