Top: Autodesk Maya: Scripts : How to make a fun pause screen using mel
How to make a fun pause screen using mel
From our website: http://www.tjgalda.com How to make a fun pause screen using mel. - TJ Galda, CG Supervisor There are times when you may need to create a pause screen to entertain the users while you fetch something or do some work in the background. This is probably one of the more interesting times that you can make use of a gradient. This tutorial will show you how to create a screen that slowly turns green as the job is completed. Once the designated pause time is done, the window goes away and returns control to the user. The first step is to create a gradient or ramp node: //Create the gradient using a ramp: string $tj_tempName = `shadingNode -asShader ramp`; string $tj_rampNode = `rename $tj_tempName "tj_gradientColourTemp"`; After that, we need to set up colours. Were using a black ramp that fills to green, so we need three colours. A black to fill, a green to go to, and one that makes the transition. setAttr ($tj_rampNode + ".colorEntryList[0].color") -type double3 0.2 1 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[1].color") -type double3 0.2 0 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[2].color") -type double3 0 0 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[0].position") 0.0; setAttr ($tj_rampNode + ".colorEntryList[1].position") 0.0; setAttr ($tj_rampNode + ".colorEntryList[2].position") 1.0; After that, we need to create a window and display the ramp to the user. //create window string $tj_winName = "tj_winName"; string $tj_winTitle = "TJ Fun Pause Screen"; if ( `window -exists $tj_winName` ) deleteUI -window $tj_winName; string $tj_rampWin = `window -t $tj_winTitle -wh 258 258 $tj_winName`; columnLayout; rampColorPort -node $tj_rampNode; showWindow $tj_rampWin; Now we need to take control away from the user, and have something happen. As shown above, we achieve this by having our ramp slowly change from black to green and fill in. It can be all done with a simple loop. By slicing the counter smaller and smaller, the pause will increase. As noted in the comments below, were using a slice of 0.005. //do timer by filling in ramp with greenfloat $tj_i = 0.0; while ($tj_i < 1) { float $tj_newPos = $tj_i; setAttr ($tj_rampNode + ".colorEntryList[1].position") $tj_newPos; setAttr ($tj_rampNode + ".colorEntryList[1].color")0.2 $tj_newPos 0.2 ; // the smaller this increment, the longer the pause // using 0.005 tends to get us in around 15 seconds $tj_i = $tj_i + 0.005; showWindow $tj_rampWin; } Thats all there is too it. All we have left is to clean up what weve done. Delete the window and ramp nodes: ///////////////////////////////////// // 15 seconds passed, all done pausing //kill window if ( `window -exists $tj_winName` ) deleteUI -window $tj_winName; //delete ramp delete $tj_rampNode; print "n -=-=-=-= Finished pause screen. =-=-=-=- n"; //done More tutorials also available at our website: http://www.tjgalda.com .
ADVERTISMENT
Looking for Job?
3DK.org is hiring 3ds max tutorial writers! If you're interested, please send your resume to info@NO-SPAMcgtutorials.com (remove NO-SPAM). Please include few examples of your previous tutorials and/or articles.
More Scripts Tutorials for Autodesk Maya
Top: Autodesk Maya: Scripts: dreamLipSync - Talk To Me
Top: Autodesk Maya: Scripts: Walk Cycle
Top: Autodesk Maya: Scripts: Window Size
Top: Autodesk Maya: Scripts: MEL Script info
Top: Autodesk Maya: Scripts: Maya Expressions 2
Top: Autodesk Maya: Scripts: Maya Expressions 1
Top: Autodesk Maya: Scripts: mel ShapeEditor
Top: Autodesk Maya: Scripts: Expressions
Top: Autodesk Maya: Scripts: Fast Puffy Type Explosions in Maya
Top: Autodesk Maya: Scripts: Making Tank Treads using AS_TreadsCreation script
Categories
- Adobe Photoshop
- Autodesk Maya
- Autodesk 3DS Max
- Blender
- Bryce
- Corel DRAW
- Cycore Cult3D
- Macromedia Flash
- Maxon Bodypaint 3D
- Maxon Cinema 4D
- LightWave 3D
- Pixologic ZBrush
- Rhinoceros
- SoftImage XSI
- Vue d'Esprit
» Hardware reviews
CG Tutorials
- » Add a tutorial (and get rewarded)
- » Login
- » Register (3D Kingdom)
- » About/FAQ/Contact
Highest Rated
![]() |
Water drops on leaf - Made most realistic water drop effect in Photoshop....
Rated: |
![]() |
Exploding planet earth in photoshop - Draw Exploding planet earth in photoshop using tool and filters....
Rated: |
![]() |
Changing color in Flash - Learn how to change color of objects in Flash. Choose which colors you̵...
Rated: |
![]() |
Draw 3D earth in Corel Draw. - Corel Draw can do more then u expect. Check it....
Rated: |
Most Popular
![]() |
Vector Effect - I am going to show you that is quick and easy way to convert a picture in v...
Rated: |
![]() |
Ten Photoshop Tips and Tricks - In this tutorial, we present ten favorite creative and useful techniques....
Rated: |
![]() |
Metallic Type Text Effect - I am going to show you a quick and easy variation on metallic text effect....
Rated: |
![]() |
How to draw custom arrows in photoshop with the pen tool with a final 3-D embossing effect. - How to draw custom arrows in photoshop with the pen tool with a final 3-D e...
Rated: |








No comments at this moment