Time Tags Access using the FrameTagManager Interface

The Time Tags are used to define reference points on the time line for quick navigation.

They are now accessible via the FrameTagManager Interface (corresponding to the IFrameTagManager interface in the SDK).

The example below demonstrates the access to time tags via MAXscript using the FrameTagManager Interface.

For example:

ntags = FrameTagManager.GetTagCount() --> 0

tag1 = FrameTagManager.CreateNewTag "tag1" 15 --> 1

tag2 = FrameTagManager.CreateNewTag "tag2" 25 lockID:tag1 scale:true --> 2

tag3 = FrameTagManager.CreateNewTag "tag3" 25 scale:false --> 3

loop1 = FrameTagManager.CheckForLoop tag1 tag2 --> false

loop2 = FrameTagManager.CheckForLoop tag2 tag1 --> true

loop3 = FrameTagManager.CheckForLoop tag1 tag3 --> false

loop4 = FrameTagManager.CheckForLoop tag3 tag1 --> false

 

ntags = FrameTagManager.GetTagCount() --> 3

 

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

 

FrameTagManager.SetTimeByID tag1 10 --> ok

FrameTagManager.SetLockIDByID tag3 tag2 --> true

FrameTagManager.SetNameByID tag1 "modified tag1" --> ok

FrameTagManager.SetScaleByID tag1 false --> ok

 

ntags = FrameTagManager.GetTagCount() --> 3

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

 

FrameTagManager.SetTimeByID tag2 5 relative:true --> ok

 

ntags = FrameTagManager.GetTagCount() --> 3

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

 

FrameTagManager.DeleteTag tag2 --> ok

FrameTagManager.FindItem tag2 --> 0

FrameTagManager.FindItem tag3 --> 2

 

ntags = FrameTagManager.GetTagCount() --> 2

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

 

FrameTagManager.SetLockIDByID tag1 tag3 --> true

FrameTagManager.GetTimeByID tag1 --> 10f

FrameTagManager.SetLockIDByID tag3 tag1 --> false

FrameTagManager.GetTimeByID tag3 --> 20f

FrameTagManager.CheckForLoop tag1 tag3 --> true

FrameTagManager.CheckForLoop tag3 tag1 --> false

FrameTagManager.SetLockIDByID tag1 0 --> true

FrameTagManager.GetTimeByID tag1 --> 10f

 

FrameTagManager.FindItemByTime 10 --> 1

FrameTagManager.FindItemByTime 15 --> 0

FrameTagManager.FindItemByTime 20 --> 2

 

 

See also

Interface: FrameTagManager