Search Unity

Cinemachine Track Curve Editor missing curve presets and copy/paste

Discussion in 'Cinemachine' started by Baste, Nov 25, 2021.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I've got a camera blend that used to be handled by just activating a new VCam and using the brain's blend settings. I want to transfer that blend to a Timeline.

    The current blend uses an animation curve, so I want to copy the same animation curve to the Timeline's blend. Usually when I want to transfer animation curves from one object to another, there's two ways to do it:

    - newish: Right-click one curve, copy, right click another, paste:
    upload_2021-11-25_14-34-18.png

    - older: use the AnimationCurve preset feature in order to temporarily store the old curve as a an preset, and then apply the preset to the new curve:
    upload_2021-11-25_14-35-40.png

    But when I'm trying to edit the curves for a blend in on a CinemachineTrack, nether feature are available. The right click doesn't show a copy/paste menu, and the curve editor doesn't have any of the custom presets:

    upload_2021-11-25_14-36-54.png

    Is this an oversight, or is there a fundamental reason why these features are missing from the curves in Timeline? It seems strange that the features have seemingly been reimplemented in an inferior form.
     

    Attached Files:

    Last edited: Nov 25, 2021
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    I don't have the full historical reason, but a quick look at the code shows that we had to reimplement it. I believe it's because TimelineClips are not ScriptableObjects, so they can't use ObjectFields of type AnimationCurve (which need a SerializedObject to function).

    There are also good (performance) reasons why TimelineClips are not ScriptableObjects.

    At the end of the day, I agree that it's unfortunate, but considering the complexity of this custom implementation, it's unlikely that the Timeline team will update it before there is a newer, non-IMGUI, non-SerializedObject widget available.