$pushd and $popd: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
m (increased quality)
Line 1: Line 1:
Used to temporarly change the curren working directory for the script.
Used to set the current working directory in a qc script.


==Description==
==Description==


$pushd (directory)
$pushd ".\path\to\files\"


The default working directory will be the folder of the .qc file. The $pushd must be meat with a [[$popd]]. Multiple $pushd can be nested in side eacher othere.
The default working directory is the folder of the .qc file. The $pushd must be met with a [[$popd]]. Multiple $pushd can be nested inside each other.


==Parameters==
==Parameters==
* (directory) full or relative path on the file system. The path should be douple quoted.
* The path should be a full or relative path on the file system.


==Example==
==Example==
$modelname "props/fan.mdl"<br />
$modelname "props/fan.mdl"
$cdmaterials "models/props/"<br />
$cdmaterials "models/props/"
$model "Fan" "fan.smd"<br />
$model "Fan" "fan.smd"
'''$pushd ".\new animations\"'''<br />
'''$pushd ".\new animations\"'''
$sequence "rotate" "rotate.smd"<br />
$sequence "rotate" "rotate.smd"
$popd<br />
$popd
$sequence "idle" "idle.smd"
$sequence "idle" "idle.smd"

Revision as of 20:46, 13 October 2007

Used to set the current working directory in a qc script.

Description

$pushd ".\path\to\files\"

The default working directory is the folder of the .qc file. The $pushd must be met with a $popd. Multiple $pushd can be nested inside each other.

Parameters

  • The path should be a full or relative path on the file system.

Example

$modelname "props/fan.mdl"
$cdmaterials "models/props/"
$model "Fan" "fan.smd"
$pushd ".\new animations\"
$sequence "rotate" "rotate.smd"
$popd
$sequence "idle" "idle.smd"