アタッチメント コントローラ キー
         
         アタッチメント コントローラは、他のほとんどのコントローラと異なるキーを使用します。MAXAKey クラス は、アタッチメント コントローラのキーと、面インデックスや面の重心座標などの固有のプロパティをすべて実装します。
            
         
          AttachCtrl.getKey()  メソッドは、MAXAKey クラスのキーを返します。このメソッドには、アタッチメント コントローラと取得するキーのインデックスという 2 つの引数が必要です(使用できるすべての
            AttachCtrl メソッドのリストについては、「Attachment : PositionController」を参照してください)。 
         
             
         
          プロパティ 
         
         <MAXAKey>. face: Integer (0-based) 	 
 
         アタッチする面の 0 から始まるインデックスを取得/設定します。 
         
             
         
         <MAXAKey>. coord: Point2 (barycentric coordinates)   
 
         アタッチする面の重心座標を取得/設定します。 
         
             
         
         
         キーの時間を取得/設定します。 
         
             
         
         <MAXAKey>. selected: Boolean 
 
         キーの選択状態を取得/設定します。 
         
             
         
         <MAXAKey>. tension: Float 
 
         テンションを取得/設定します。 
         
             
         
         <MAXAKey>. continuity: Float 
 
         連続性を取得/設定します。 
         
             
         
         
         バイアスを取得/設定します。 
         
             
         
         
         前イーズの値を取得/設定します。 
         
             
         
         <MAXAKey>. easeFrom: Float 
 
         後イーズの値を取得/設定します。 
         
         次のスクリプトでは、最上部に天球体をアタッチした円柱を作成し、以下の変形を行ってからアニメートします。 
         
            
               
                  
               
               
                  |    例 
                       
                   | 
               
               
                   
                     
c = cylinder height:100 heightsegs:10--create a tall segmented cylinder
addModifier c (Bend())--add a Bend Modifier to the cylinder
s = geosphere()--create a default geosphere
actrl = Attachment()--create an Attachment controller
s.position.controller = actrl--assign to the position of the geosphere
actrl.node = c--set the cylinder as the node to attach to
addNewKey actrl 0f--add a key at frame 0
theAKey = AttachCtrl.getKey actrl 1--get the first key
--Set the face index (0-based) by reading the number of faces in the mesh
--The last face of a cylinder is always on top near the central vertex!
theAKey.face = c.mesh.numfaces - 1
--Set the coordinates for the center.
--The barycentric coordinates of the central vertex are [1,0]
theAKey.coord = [1,0]
with animate on at time 100--animate on frame 100
(
c.height = 200--animate the height of the cylinder
c.bend.angle = 90--and the bend angle
)
   
                   | 
               
               
                  |          
                        
                   |