Public Member Functions

ILockedTracksMan Class Reference

This reference page is linked to from the following overview topics: Making Controllers Lockable.


Search for all occurrences

Detailed Description

Locked Track Manager This class provides an interface for managing and setting locks on acceptable tracks.



To get a pointer to this class simply call

static_cast<ILockedTracksMan*>( GetCOREInterface(ILOCKEDTRACKSMAN_INTERFACE ) );

#include <ILockedTracks.h>

Inheritance diagram for ILockedTracksMan:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool  IsLockable (ReferenceTarget *anim, ReferenceTarget *client, int subNum)=0
  Function to see if a particular track is lockable.
virtual bool  GetLocked (ReferenceTarget *anim, ReferenceTarget *client, int subNum, bool checkOverride=true)=0
  Function to see if a particular track is locked or unlocked.
Setting Locks
virtual void  SetLocks (bool val, Tab< ReferenceTarget * > &anims, Tab< ReferenceTarget * > &clients, Tab< int > &subNums, bool lockSubAnims)=0
  Function to set or unset a lock on a list of possible tracks.
virtual void  ToggleLocks (Tab< ReferenceTarget * > &anims, Tab< ReferenceTarget * > &clients, Tab< int > &subNums, bool lockSubAnims)=0
  Function to toggle a lock on a list of possible tracks.
Unlocking Overrides
virtual void  SetUnLockOverride (bool val)=0
  Function to unlock all locks.
virtual bool  GetUnLockOverride () const =0
  Function to get the state of the unlock override.
virtual void  PushUberUnLockOverride ()=0
  Function to override all locked tracks, even those in containers.
virtual void  PopUberUnLockOverride ()=0
  Function to pop the uber unlock override state.
virtual int  GetUberUnLockOverride () const =0
  Function to get the state of the uber unlock override.
Convenience Functions
virtual void  FindLockedAnims (bool locked, bool checkOverride, ReferenceTarget *refTarget, Tab< ReferenceTarget * > &anims, Tab< ReferenceTarget * > &clients, Tab< int > &subnums)=0
  Function to find all locked or unlocked anims on a node.
virtual bool  IsAnimOverrideUnlocked (ReferenceTarget *anim)=0
  Function to test whether or not a particular anim is overriden unlocked or not.

Member Function Documentation

virtual bool IsLockable ( ReferenceTarget anim,
ReferenceTarget client,
int  subNum 
) [pure virtual]

Function to see if a particular track is lockable.

This funcion is used to see if a particular track may get locked and ulocked.

Parameters:
[in] anim The track that we are checking to see if it's lockable.
[in] client The parent of the track that we are testing to see if it's lockable.
[in] subNum The subanim number of the anim related to it's client.
Returns:
Returns true if a track can get locked and unlocked, false if it can't get locked or unlocked.
virtual bool GetLocked ( ReferenceTarget anim,
ReferenceTarget client,
int  subNum,
bool  checkOverride = true 
) [pure virtual]

Function to see if a particular track is locked or unlocked.

This function is used to see if a track is locked or unlocked.

Parameters:
[in] anim The track that we are checking to see if it's locked
[in] client The parent of the track that we are testing to see if it's locked.
[in] subNum The subanim number of the anim related to it's client.
[in] checkOverride If true we check the overrides first before testing to see if the item is locked, if false then we don't check the override state and rather just check the state of the locked item by itself.
Returns:
Returns true if a track is locked, false if it's unlocked or if it's unlockable.
See also:
IsLockable
virtual void SetLocks ( bool  val,
Tab< ReferenceTarget * > &  anims,
Tab< ReferenceTarget * > &  clients,
Tab< int > &  subNums,
bool  lockSubAnims 
) [pure virtual]

Function to set or unset a lock on a list of possible tracks.

This function is used to lock or unlock a list of possible tracks. The tracks are represented by a pointer to the track, a pointer to their parent, and it's parent sub anim number. You can specify if you want to propagate the locking or unlocking to the tracks children.

Parameters:
[in] val If true we lock, if false we unlock.
[in] anims The list of tracks that you want to lock or unlock
[in] clients The list of the tracks parents.
[in] subNums The list of the subAnim id's for each of the track for each parent.
[in] lockSubAnims If true then we also lock or unlock the tracks subanims, if false then we don't.
virtual void ToggleLocks ( Tab< ReferenceTarget * > &  anims,
Tab< ReferenceTarget * > &  clients,
Tab< int > &  subNums,
bool  lockSubAnims 
) [pure virtual]

Function to toggle a lock on a list of possible tracks.

This function is used to toggle a lock on a list of possible tracks. The tracks are represented by a pointer to the track , a pointer to their parent, and it's parent sub anim number. You can specify if you want to propagate the locking or unlocking to the tracks children.

Parameters:
[in] anims The list of tracks that you want to toggle the lock on.
[in] clients The list of the tracks parents.
[in] subNums The list of the subAnim id's for each of the track for each parent.
[in] lockSubAnims If true then we also toggle the locks on the tracks sub anims, if false we don't.
virtual void SetUnLockOverride ( bool  val ) [pure virtual]

Function to unlock all locks.

Note will NOT unlock a locked item in an imported container.

Parameters:
[in] val The value of the current state of the unlock override. If true then all locked items, not in an imported container, will become unlocked.
virtual bool GetUnLockOverride ( ) const [pure virtual]

Function to get the state of the unlock override.

Returns:
Returns the value fo the current state of the unlock override. If true then all locked items, not in an imported container, are unlocked.
virtual void PushUberUnLockOverride ( ) [pure virtual]

Function to override all locked tracks, even those in containers.

This function will push an unlock override state that will let you override and unlock all tracks, including those that locked in a container. Useful usually when you want to have a script, like a script controller, still be able to drive locked tracks. Note that you need to call PopUberUnLockOverride to when you are done with this override and it should be used in a limited, local manner.

virtual void PopUberUnLockOverride ( ) [pure virtual]

Function to pop the uber unlock override state.

This function will pop an unlock override state that will let you override and unlock all tracks, including those that locked in a container. This function needs to be called at some point after every PushUberUnLockOverride function call. If called before PushUberUnLockOverride an error may occur.

virtual int GetUberUnLockOverride ( ) const [pure virtual]

Function to get the state of the uber unlock override.

This function will return the value of how many existing pushes of the uber unlock override state exist. So, if this value is greater or equal to one then we have an active uber unlock override occuring, if the value is zero then we don't have this override, if this value is less than zero, then we have an error since a PopUberUnLockOverride(), was called without first calling PushUberUnLockOverride.

virtual void FindLockedAnims ( bool  locked,
bool  checkOverride,
ReferenceTarget refTarget,
Tab< ReferenceTarget * > &  anims,
Tab< ReferenceTarget * > &  clients,
Tab< int > &  subnums 
) [pure virtual]

Function to find all locked or unlocked anims on a node.

Parameters:
[in] locked If true we find locked items, if false we find unlocked items. If an item is not lockable, it is not included with either option.
[in] checkOverride If true we check the overrides first before testing to see if the item is locked,
[in] refTarget The reference target we will find the anims on.
[out] anims The list of anims that are locked or unlocked.
[out] clients The parents of the anims that are locked or unlocked.
[out] subNums The subanim index of the anims that are locked or unlocked
virtual bool IsAnimOverrideUnlocked ( ReferenceTarget anim ) [pure virtual]

Function to test whether or not a particular anim is overriden unlocked or not.

Parameters:
[in] anim The anim we are testing to see if it's overriden unlocked or not.
Returns:
If true the item is overriden unlocked and a locked item should now return false when queried for it's locked state.

ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan
ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan ILockedTracksMan