Curve editor doesn’t use Unity’s default Tangent mode of Clamped Auto

Slate Forums Support Curve editor doesn’t use Unity’s default Tangent mode of Clamped Auto

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2602
    dgoyette
    Participant

    I looked all through the code to see if I could figure out where this is being set, but I’m at a loss…

    Simple version: When adding curves, I want the tangent mode to be “Clamped Auto” instead of “Auto”. When adding curves in a Unity animation clip, Clamped Auto is the default. But for some reason, when adding curves in Slate, it uses “Auto” instead. See the attached image as an example.

    Clamped-Auto

    It doesn’t seem like the value on the Slate Preferences screen affects this, and I could see where the actual m_Curve data was being set.

    Is there a way to get Slate to default to Clamped Auto instead of Auto? If that’s not a setting, then perhaps you can point me to the code that’s setting it?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #2604
    dgoyette
    Participant

    A bit more digging, and this ends up being pretty simple. In CurveUtility.cs, under the TangentMode enum defined there, add “ClampedAuto” to the end of the enum. Now open the Slate preferences window and choose Clamped Auto for Initial Keyframe Tangents. (I think you then need to close the Slate editor and reopen it.)

    But now my keyframes get inserted with Clamped Auto for their tangents.

    I’m not sure if it’s just as simple as expanding this enum, but so far so good.

    #2608
    Gavalakis
    Keymaster

    Hello again. Thanks for letting me know. I will add this for the next version as well 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.