home *** CD-ROM | disk | FTP | other *** search
/ Learning Maya 3 / Learning_Maya_3.iso / docs / how_tos / import_eps / includes / bevelCaps.mel next >
Encoding:
Text File  |  2000-05-05  |  2.3 KB  |  74 lines

  1. //
  2. // Copyright (C) 1999-2000 Alias|Wavefront,
  3. // a division of Silicon Graphics Limited.
  4. //
  5. // The information in this file is provided for the exclusive use of the
  6. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  7. // and incorporate this code into other products for purposes authorized
  8. // by the Alias|Wavefront license agreement, without fee.
  9. //
  10. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  11. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  12. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  13. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  14. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. // PERFORMANCE OF THIS SOFTWARE.
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  Aug 17, 1999
  22. //  Author:         rjm
  23. //
  24. //  Description:
  25. //      Add planar caps to the top and bottom of selected bevelled surface
  26. //    This script also sets the planar surfaces to a high quality of 
  27. //    tessellation to get good quality results when rendered
  28. //
  29. //  Usage:
  30. //    Select coplanar profile curves - for example, text - then apply
  31. //    a bevel. Adjust the bevel attributes to the desired setting.
  32. //    With the bevelled surfaces selected, apply the bevelCaps.mel script
  33. //    This creates one planar surface for the front of the text and one
  34. //     for the back. If you want to add caps on a letter by letter basis 
  35. //    then you must run the script on each letter separately. Be sure 
  36. //    to select all bevels for each letter and run the script.
  37. //    Note: after applying the bevel, updating construction history on the
  38. //    bevel will not update the caps. You will need to reapply the script. 
  39.  
  40.  
  41. global proc bevelCaps () {
  42.  
  43. //find out which surfaces have been selected
  44.  
  45. $bevels = `selectedNodes`;
  46.  
  47. //select the bottom isoparm and set planar.
  48.  
  49. select .u[0];
  50. planarSrf;
  51.  
  52. //set the tessellation criteria
  53.  
  54. setAttr .smoothEdge 1;
  55. setAttr .curvatureTolerance 0;
  56.  
  57. //reselect the original surfaces
  58.  
  59. select $bevels;
  60.  
  61. //select the top isoparm and set planar. Your parametrization is
  62. //probably less than 1000 therefore the top value available 
  63. //will be used.
  64.  
  65. select .u[1000];
  66. planarSrf;
  67.  
  68. //set the tessellation criteria
  69.  
  70. setAttr .smoothEdge 1;
  71. setAttr .curvatureTolerance 0;
  72.  
  73. }
  74.