$pushd and $popd: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(edited teh page to add more information to the main text and expanded on teh example.) |
||
Line 1: | Line 1: | ||
The [[QC command]]s '''$pushd''' and '''$popd''' 'push' and 'pop' directories to and from the QC's active folder. Multiple <code>$pushd</code> can be nested inside each other, so long as there are a corresponding number of <code>$popd</code>. | The [[QC command]]s '''$pushd''' and '''$popd''' 'push' and 'pop' directories to and from the QC's active folder, instead of writing out the foldernames in the smd file. Multiple <code>$pushd</code> can be nested inside each other, so long as there are a corresponding number of <code>$popd</code>. | ||
== Syntax == | == Syntax == | ||
Line 9: | Line 9: | ||
== Example == | == Example == | ||
$modelname "props\fan.mdl" | $modelname "props\fan.mdl" | ||
$cdmaterials "models\props\ | $cdmaterials "models\props\" | ||
'''$pushd''' ".\ | $model "buttons" "model files\buttons.smd" //Without using pushd | ||
'''$pushd''' ".\model files\" | |||
$model fan_housing "housing.smd" | |||
$model fan_rotor "rotor.smd" | |||
'''$popd''' | '''$popd''' | ||
$sequence | '''$pushd''' ".\animation files\" | ||
$sequence idle_off "idle_off.smd" | |||
$sequence turn_on "turn_on.smd" | |||
$sequence idle_on "idle_on.smd" | |||
$sequence turn_off "turn_off.smd" | |||
'''$popd''' | |||
[[Category:QC Commands|pushd]] | [[Category:QC Commands|pushd]] |
Revision as of 01:09, 10 January 2020
The QC commands $pushd and $popd 'push' and 'pop' directories to and from the QC's active folder, instead of writing out the foldernames in the smd file. Multiple $pushd
can be nested inside each other, so long as there are a corresponding number of $popd
.
Syntax
$pushd <path> ... $popd
Example
$modelname "props\fan.mdl" $cdmaterials "models\props\" $model "buttons" "model files\buttons.smd" //Without using pushd $pushd ".\model files\" $model fan_housing "housing.smd" $model fan_rotor "rotor.smd" $popd $pushd ".\animation files\" $sequence idle_off "idle_off.smd" $sequence turn_on "turn_on.smd" $sequence idle_on "idle_on.smd" $sequence turn_off "turn_off.smd" $popd