Search Unity

Clip coloring

Discussion in 'Timeline' started by tree_fiddler_2000, Jan 27, 2019.

  1. tree_fiddler_2000

    tree_fiddler_2000

    Joined:
    Dec 5, 2018
    Posts:
    15
    Our animators have asked to be able to color code clips in a timeline, is there a way to do this?

    So far I've tried TrackColorAttribute on theTrackAsset, but they'd like per clip colors. I've also tried rich text formatting with the asset's display name, but rich text doesn't look its supported.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    There's no way to do that....yet.
     
  3. tree_fiddler_2000

    tree_fiddler_2000

    Joined:
    Dec 5, 2018
    Posts:
    15
    LOL, thanks, not a major feature but would make for some designer smiles around here.
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    in 2019.2 you can use a ClipEditor to dynamically set the highlight color of a clip.

    Code (CSharp):
    1. [CustomTimelineEditor(typeof(MyCustomClip))]
    2. public class MyCustomClipEditor : ClipEditor
    3. {
    4.     public override ClipDrawOptions GetClipOptions(TimelineClip clip)
    5.     {
    6.         var options = base.GetClipOptions(clip);
    7.         options.highlightColor = Color.blue;
    8.         return options;
    9.     }
    10. }
    11.