home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / Shade all Views.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  735 b   |  42 lines

  1. ' This simple macro shows how to shade or hide all views
  2. '
  3. ' Toggle out of 2D Drafting Mode
  4.     if Sys(344) Then
  5.             >2DMode
  6.             {
  7.             }
  8.     end if
  9. ' Draw 3D Shapes
  10.     >Box
  11.     {
  12.         <Pointxyz 0, 0, 0
  13.         <Pointxyz 10, 10, 10
  14.         }
  15.     >Cylinder
  16.     {
  17.     <Pointxyz 5, -5, 5
  18.        <Pointxyz 8, -5, 5
  19.         <Pointxyz 8, 15, 5
  20.        }
  21.     >FitToWindow
  22.     {
  23.      }
  24. ' Hidden Line Removal in all views
  25. ' Sys71 is the current view, 
  26. ' Sys2 is the mode, 0-4
  27. '0 = wireframe
  28. '1 = OpenGL Hidden
  29. '2 = OpenGL Flat Shade
  30. '3 = OpenGL Smooth Shade
  31. '4 = OpenGl Hidden (no surface intersections)
  32. for a = 0 to 3
  33.     Sys(71) = a
  34.     Sys(2) = 1
  35. next a
  36. ' Make large perspective view the active view again
  37.     Sys(71) = 1
  38. >Regenerate
  39.     {
  40.       }
  41. End
  42.