-
-
Save jonahkagan/4432091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global proc vehicleLoop( string $time, string $textureProfile, int $areaNum, int $camNum, int $zoomNum ) { | |
for( $carNum = 1; $carNum < 6; ++$carNum ) { | |
// display the correct car | |
string $carName = "car_transform" + $carNum; | |
showHidden $carName; | |
string $carShader = "car" + $carNum + "_shader1.color"; | |
for( $index = 1; $index < 3; ++$index ) { | |
float $randomFloat = rand( 1, 10.99 ); | |
int $randomInt = $randomFloat; | |
if( $randomInt == 1 ) { setAttr $carShader -type double3 0.0392157 0.223529 0.505882 ; } | |
if( $randomInt == 2 ) { setAttr $carShader -type double3 0.992157 0.780392 0.0117647 ; } | |
if( $randomInt == 3 ) { setAttr $carShader -type double3 0.34902 0.180392 0.184314 ; } | |
if( $randomInt == 4 ) { setAttr $carShader -type double3 0.227451 0.254902 0.34902 ; } | |
if( $randomInt == 5 ) { setAttr $carShader -type double3 0.533333 0.470588 0.407843 ; } | |
if( $randomInt == 6 ) { setAttr $carShader -type double3 0.580392 0.215686 0.196078 ; } | |
if( $randomInt == 7 ) { setAttr $carShader -type double3 0.290196 0.368627 0.32549 ; } | |
if( $randomInt == 8 ) { setAttr $carShader -type double3 0.486275 0.27451 0.145098 ; } | |
if( $randomInt == 9 ) { setAttr $carShader -type double3 0.105882 0.0980392 0.101961 ; } | |
if( $randomInt == 10 ) { setAttr $carShader -type double3 0.862745 0.835294 0.803922 ; } | |
renderCall( "car", $time, $textureProfile, $areaNum, $camNum, $carNum, $zoomNum, $randomInt ); | |
} | |
hide $carName; | |
} | |
for ($motoNum = 1; motoNum < 6; ++motoNum ) { | |
// display the correct motorcycle | |
string $motoName = "motorcycle_transform" + $motoNum; | |
showHidden $motoName; | |
renderCall( "motorcycle", $time, $textureProfile, $areaNum, $camNum, $zoomNum, 1 ); | |
// reverse orientation | |
string $motoTransform = "motorcycle_transform" + $motoNum + ".scaleZ" -51.967; | |
renderCall( "motorcycle", $time, $textureProfile, $areaNum, $camNum, $zoomNum, 2); | |
// restore orientation | |
// hide the motorcycle | |
string $motoTransform = "motorcycle_transform" + $motoNum + ".scaleZ" -51.967; | |
hide $motoName; | |
} | |
// This final renderCall produces an images with neither motorcycle nor car | |
renderCall( "empty", $time, $textureProfile, $areaNum, $camNum, $zoomNum, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment