$body: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The [[$body]] [[QC command]] is used to specify the ''reference.smd'' file that will become the [[$modelname]].mdl.
The [[$body]] [[QC command]] is used to specify a [[body mesh]] that contains [[vertex]], [[UV map]], [[skeleton]] and [[envelope]] data for the model. Without at least one body, the model will have no physical appearance or [[skeleton]].


* Use [[$body]] for all models unless you need to specify special animation parameters like eyes, flexes etc.; in which case use [[$model (QC)]] instead.
{{tip|Models with [[facial animation]] use <code>[[$model (QC)|$model]]</code>.}}


== Parameters ==
== Usage ==


  $body "<name>" "<reference>.smd"
  $body <name> <reference smd>
 
== Options ==


;<code><name></code>
;<code><name></code>
:Can be anything you like. It is used as a convenient label by [[HLMV]] to distinguish the main mesh from other [[$bodygroup]] meshes.  
:A label for this body to distinguish it from other [[$bodygroup]] meshes.  
;<code><reference SMD></code>
;<code><reference smd></code>
:Path to and name of the 'reference' SMD, relative to the QC file's current directory.
:Path to and name of the 'reference' (sometimes 'model') SMD relative to the QC file's current directory.


==QC syntax example==
== Example ==


  [[$modelname]] "weapons/shell.mdl"
  [[$modelname]] "weapons/shell.mdl"
  [[$cdmaterials]] "models/weapons/"
  [[$cdmaterials]] "models/weapons/"
  '''[[$body]] "Shell" "shell_ref.smd"'''
  '''[[$body]] shell "shell-ref.smd"'''
  [[$sequence]] idle "shell_idle.smd"
  [[$sequence]] idle "shell-idle.smd"




[[Category:QC Commands]]
[[Category:QC Commands]]

Revision as of 11:05, 27 April 2008

The $body QC command is used to specify a body mesh that contains vertex, UV map, skeleton and envelope data for the model. Without at least one body, the model will have no physical appearance or skeleton.

Tip.pngTip:Models with facial animation use $model.

Usage

$body	<name> <reference smd>

Options

<name>
A label for this body to distinguish it from other $bodygroup meshes.
<reference smd>
Path to and name of the 'reference' (sometimes 'model') SMD relative to the QC file's current directory.

Example

$modelname		"weapons/shell.mdl"
$cdmaterials		"models/weapons/"
$body		shell	"shell-ref.smd"
$sequence	idle	"shell-idle.smd"