$body: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎See also: Russian language link)
No edit summary
Line 1: Line 1:
The [[$body]] [[QC command]] is used to include a [[reference mesh]] [[Studiomdl Data|SMD]] in a model. Without at least one $body the model will not be rendered.
The [[QC command]] '''<code>[[$body]]</code>''' is used to add a [[reference mesh]] to a model. Without at least one <code>$body</code> the model will be invisible.


{{tip|Models with [[facial animation]] use <code>[[$model (QC)|$model]]</code>.}}
Models with [[facial animation]] should use <code>[[$model (QC)|$model]]</code> instead.
 
{{tip|Multiple reference meshes can be handled with a <code>[[$bodygroup]]</code>.}}


{{tip|Multiple reference meshes can be handled with a [[$bodygroup]].}}
<!--
// I would collapse this into one tip :
{{tip|See also: For including additional sub-meshes see [[$bodygroup]]. For models with [[facial animation]]s see <code>[[$model (QC)|$model]]</code>.}}
-->
== Syntax ==
== Syntax ==


  $body <name> "<reference mesh SMD>"
  $body <name> <reference mesh [[Studiomdl Data|SMD]]>
<!-- // lol no :-) ...
$body <body_mesh> "<reference.smd>"
-->
where :
 
;<code><name></code>
:A label for this $body to distinguish it from other reference meshes (if there are any).
<!--
// there can only be 1 "reference" mesh, but any number of sub-meshes. how about: ...
;<code><body_mesh></code>
:An arbitrary label to distinguish the [[reference mesh]] from any [[$bodygroup]] sub-meshes.
-->
;<code><reference smd></code>
:Path to and name of the 'reference' (sometimes 'model') SMD relative to the QC file's current directory. The <code>.smd</code> extension is optional, but helps make the QC file easier to read.


== Example ==
== Example ==
Line 34: Line 17:


== See also ==
== See also ==
*[[Reference mesh]]
*[[Reference mesh]]
*[[$lod]] "replacemodel"
*[[$lod]], for lowering detail at a distance
*[[$bodygroup]]
*[[$bodygroup]], for managing multiple <code>$body</code>s
*[[$model (QC)|$model]]
*[[$model (QC)|$model]], for facial animation
<!-- // arguably: re-listing links here that are/should be explained above is unnecessary clutter? -->


{{otherlang:en}}
{{otherlang:en}}
{{otherlang:en:ru|$body:ru}}
{{otherlang:en:ru|$body:ru}}


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

Revision as of 07:00, 7 January 2009

The QC command $body is used to add a reference mesh to a model. Without at least one $body the model will be invisible.

Models with facial animation should use $model instead.

Tip.pngTip:Multiple reference meshes can be handled with a $bodygroup.

Syntax

$body	<name> <reference mesh SMD>

Example

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

See also

Template:Otherlang:en Template:Otherlang:en:ru