$scale: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
The [[QC command]] '''<code>$scale</code>''' multiplies the size of the input meshes by a [[float]] value. The default value is <code>1</code>.
The '''<code>$scale</code>''' [[QC command]] multiplies the size of all subsequent SMDs. It does ''not'' affect values defined in the QC itself (e.g. [[$attachment]] locations).


{{note|<code>$scale</code> only affects .SMD file references (such as <code>$body</code> or <code>$model</code>) that are ''below'' it in the QC. For this reason, be sure to specify it before any file references!}}
{{note|<code>$scale</code> only affects SMDs that come after it in the QC. Specify it before any file references!}}


== Syntax ==
{{warning|<code>$scale</code> prevents [[flex animation]] from working.}}


$scale <scale amount>
== Example ==


== Example ==
<source lang=php highlight=4>
$modelname "weapons/shell.mdl"
$cdmaterials "models/weapons/"


'''$scale 3'''
$scale 3 // before any SMDs
[[$modelname]] "weapons/shell.mdl"
$body shell "shell_ref.smd"
[[$cdmaterials]] "models/weapons/"
$sequence idle "shell_idle.smd"
[[$body]] shell "shell_ref.smd"
</source>
[[$sequence]] idle "shell_idle.smd"


[[Category:QC Commands|scale]]
[[Category:QC Commands|scale]]

Revision as of 04:34, 12 March 2011

The $scale QC command multiplies the size of all subsequent SMDs. It does not affect values defined in the QC itself (e.g. $attachment locations).

Note.pngNote:$scale only affects SMDs that come after it in the QC. Specify it before any file references!
Warning.pngWarning:$scale prevents flex animation from working.

Example

$modelname		"weapons/shell.mdl"
$cdmaterials	"models/weapons/"

$scale		3		// before any SMDs
$body		shell	"shell_ref.smd"
$sequence	idle	"shell_idle.smd"