インタフェース > コア インタフェース > LockedTracksMan |
3ds Max 2010 以降で使用可能になった LockedTracksMan コア インタフェースは、アニメーション トラックのロックに関連するプロパティとメソッドを公開しています。
プロパティ:
LockedTracksMan.unLockOverride : bool : Read|Write
[すべてのロックを無効](Override All Locks)オプションの状態を取得/設定します。
true に設定すると、ロックされたトラックのロック状態が一時的に無効になり、値を変更できるようになります。
false に設定した場合、ロックされたトラックの値は変更できません。
メソッド:
<void>LockedTracksMan.SetLocks <bool>lock <&maxObject array>anims <&maxObject array>clients <&index array>subNums <bool>includeChildren anims is In and Out parameter clients is In and Out parameter subNums is In and Out parameter
指定されたトラックのロックを 1 番目の引数で渡されたブール値に設定します。
が 配列 / サブアニメーション
clients は、subAnims の親コントローラの配列です。
subNums は、クライアントの子階層内にある subAnims のインデックスの配列です。
includeChildren に true が渡された場合、子トラックもロック/ロック解除されます。
例: |
trackview.open "Trackview" -- open trackview --Initialize three arrays to pass to the setLocks() method theAnims = #() theClients = #() theSubNums = #() --Loop through all selected tracks in the current TrackView for i in 1 to trackviews.current.numSelTracks() do ( --grab the parent of the current selected track local theParent = trackviews.current.getParentOfSelected i --if the parent is valid, if theParent != undefined do ( append theClients theParent --collecttheparrent --grab the sub-number of the subAnim relatively to the parent local theSubnum = trackviews.current.getSelectedSubNum i --get the subAnim track with that index from the parent local theSubanim = getsubAnim theParent theSubnum append theAnims theSubanim -- collectthe subanim append theSubNums theSubnum -- collect the index )--end if parent not undefined )--end i loop --Finally, set the locks of all selected tracks lockedTracksMan.setLocks true theAnims theClients theSubNums false |
<void>LockedTracksMan. ToggleLocks <&maxObject array>anims <&maxObject array>clients <&index array>subNums <bool>includeChildren anims is In and Out parameter clients is In and Out parameter subNums is In and Out parameter
指定された subAnims のロック状態を切り替えます。
anims は、切り替える SubAnims の配列です。
clients は SubAnims の親の配列です。
subNums は、それぞれの親の子階層内にある SubAnims のインデックスの配列です。
includeChildren に true が渡された場合、トラックの子も切り替えられます。
<bool>LockedTracksMan.GetLocked <maxObject>anim <maxObject>client <index>subNum <bool>checkOverride
指定されたトラックのロック状態を返します。
anim は subAnim です。
client は subAnim の親コントローラです。
subNum は、クライアントの子階層内にある subAnim のインデックスです。
checkOverride に true が渡された場合、ロックの無効化の状態も考慮され、無効化がアクティブな場合には、ロックされたトラックをロック解除された状態として返します。
例: |
--Loop through all selected tracks in the current TrackView for i in 1 to trackviews.current.numSelTracks() do ( --grab the parent of the current selected track local theParent = trackviews.current.getParentOfSelected i --if the parent is valid, if theParent != undefined do ( --grab the sub-number of the subAnim relatively to the parent local theSubnum = trackviews.current.getSelectedSubNum i --get the subAnim track with that index from the parent local theSubanim = getsubAnim theParent theSubnum --Check if the track is locked, unlocked or locked but overridden --and format the information about the track and its locked state: if lockedTracksMan.getlocked theSubanim theParent theSubnum true then format "LOCKED: % Parent:% Subnum:% \n" theSubanim theParent theSubnum else format "Not Locked: % Parent:% Subnum:% \n" theSubanim theParent theSubnum )--end if parent not undefined )--end i loop |
<void>UnlockChildren <&maxObject array>anims <&maxObject array>clients <&index array>subNums anims is In and Out parameter clients is In and Out parameter subNums is In and Out parameter
指定したコントローラの子をロック解除します。
3ds Max 2011 以降で使用可能です。
<bool>LockedTracksMan.IsLockable <maxObject>anim <maxObject>client <index>subNum
指定された subAnim がロック可能な場合は true、ロック不可能な場合は false を返します。
anim はチェックする subAnim です。
client はチェックする subAnim の親コントローラです。
subNum は、クライアントの子階層内にある subAnim のインデックスです。
<void>LockedTracksMan.FindLockedAnims <bool>locked <bool>checkOverride <maxObject>refTarget <&maxObject array>anims <&maxObject array>clients <&index array>subNums anims is In and Out parameter clients is In and Out parameter subNums is In and Out parameter
指定されたロック状態であるトラックを返します。
locked は、検索する状態です。true か false のいずれかです。
checkOverride は、無効化を考慮するかどうかを定義します。
refTarget は、ロック/ロック解除されたトラックを検索する最上位の maxObject です。
anims は、SubAnims を格納するための参照配列です。
clients は、SubAnims の親を格納するための参照配列です。
subNums は、それぞれの親の子階層内にある SubAnims のインデックスを格納するための参照配列です。
例: |
b=box() ( --Find all unlocked tracks of Box01 Anims = #() Clients = #() SubNums = #() --Collect the unlocked tracks without taking Overrides into account: LockedTracksMan.FindLockedAnims false false $Box01 &Anims &Clients &SubNums for i = 1 to Anims.count do format "% % %\n" Anims[i] Clients[i] SubNums[i] ) |
出力: |
Controller:Position_Rotation_Scale undefined 1 Controller:Position_XYZ Controller:Position_Rotation_Scale 1 Controller:Bezier_Float Controller:Position_XYZ 1 Controller:Bezier_Float Controller:Position_XYZ 2 Controller:Bezier_Float Controller:Position_XYZ 3 Controller:Euler_XYZ Controller:Position_Rotation_Scale 2 Controller:Bezier_Float Controller:Euler_XYZ 1 Controller:Bezier_Float Controller:Euler_XYZ 2 Controller:Bezier_Float Controller:Euler_XYZ 3 Controller:Bezier_Scale Controller:Position_Rotation_Scale 3 |
<bool>LockedTracksMan.IsAnimOverrideUnlocked <maxObject>anim
指定された subAnim トラックが無効化機能を使用してロック解除されている場合は true、その他の場合は false を返します。無効化がアクティブである場合は、subAnim がロックされていない場合でも true を返します。
<void>LockedTracksMan.PushUberUnLockOverride()
Uber-Unlock Override スタックに無効化をプッシュします。
<void>LockedTracksMan.PopUberUnLockOverride()
Uber-Unlock Override スタックから無効化をポップします。
<boolean>LockedTracksMan.GetUberUnLockOverride()
Uber-Unlock Overrides スタックに無効化が含まれていれば true、スタックに無効化がなければ false を返します。
<void>SetExposedUI <bool>expose <&maxObject array>anims anims is In and Out parameter
2 つめの引数で提示されたアニメーションの公開された UI の状態を 1 つめの引数で提示されたブール値に設定します。
3ds Max 2011 以降で使用可能です。
<bool>GetExposedUI <maxObject>anim
引数として指定されたコントローラの公開された UI の状態を返します。
3ds Max 2011 以降で使用可能です。