Select track and hide others

On 05/09/2014 at 03:04, xxxxxxxx wrote:

I want to simplify the timeline by seeing just one track. For example the animated x-coordinate track.
I can do that by selecting the track and then do a "Hide Unselected Elements".

So, to hide all other ctracks, I need to select the ctrack first.
But I do not know how to select a track in the timeline?

I can find the track and get all values, but selecting the track (highlight it) I do not know how.
When the track is selected I can do a c4d.CallCommand(465001055) # Hide Unselected Elements


On 08/09/2014 at 05:48, xxxxxxxx wrote:

Still do know how to select a timeline track.

A workaround is to use layers and the layer manager.
So, set the tracks you want to isolate on a separate layer and all others on a different layer.
Then solo that layer.

On 08/09/2014 at 07:41, xxxxxxxx wrote:

To get & select the tracks in the timeline use GetNBit() and ChangeNBit()

import c4d  
def main() :  
  obj = doc.GetActiveObject()  
  if obj is None: return False  
  Ztrack = obj.FindCTrack(c4d.DescID(c4d.DescLevel(c4d.ID_BASEOBJECT_REL_POSITION,c4d.DTYPE_VECTOR,0), c4d.DescLevel(c4d.VECTOR_Z,c4d.DTYPE_REAL,0)))  
  if Ztrack:  
      #Get the value of the Z track's selection bit    
      bit = Ztrack.GetNBit(c4d.NBIT_TL1_SELECT)  
      #This will select the object's Z track if it's not currently selected  
      if bit == 0: Ztrack.ChangeNBit(c4d.NBIT_TL1_SELECT, c4d.NBITCONTROL_SET)          
      #If the track is aleady selected this code will execute  
      if bit == 1: print "The Z track is selected"  
if __name__=='__main__':  


On 09/09/2014 at 03:58, xxxxxxxx wrote:

Great, exactly what I'm looking for!
It also tells me how to init DescId.

I did it directly in FindCTrack:
    #position = c4d.DescID([c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Z])    #not working???
    atrack = op.FindCTrack([c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Z])