home *** CD-ROM | disk | FTP | other *** search
- //
- // Copyright (C) 1999-2000 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Aug 17, 1999
- // Author: rjm
- //
- // Description:
- // Add planar caps to the top and bottom of selected bevelled surface
- // This script also sets the planar surfaces to a high quality of
- // tessellation to get good quality results when rendered
- //
- // Usage:
- // Select coplanar profile curves - for example, text - then apply
- // a bevel. Adjust the bevel attributes to the desired setting.
- // With the bevelled surfaces selected, apply the bevelCaps.mel script
- // This creates one planar surface for the front of the text and one
- // for the back. If you want to add caps on a letter by letter basis
- // then you must run the script on each letter separately. Be sure
- // to select all bevels for each letter and run the script.
- // Note: after applying the bevel, updating construction history on the
- // bevel will not update the caps. You will need to reapply the script.
-
-
- global proc bevelCaps () {
-
- //find out which surfaces have been selected
-
- $bevels = `selectedNodes`;
-
- //select the bottom isoparm and set planar.
-
- select .u[0];
- planarSrf;
-
- //set the tessellation criteria
-
- setAttr .smoothEdge 1;
- setAttr .curvatureTolerance 0;
-
- //reselect the original surfaces
-
- select $bevels;
-
- //select the top isoparm and set planar. Your parametrization is
- //probably less than 1000 therefore the top value available
- //will be used.
-
- select .u[1000];
- planarSrf;
-
- //set the tessellation criteria
-
- setAttr .smoothEdge 1;
- setAttr .curvatureTolerance 0;
-
- }
-