#πŸ–Œ-custom-timeline

Custom keyframes and visual tools for Unity's timeline: https://github.com/needle-tools/custom-timeline-editor

animtree

It’s really surprising how little there is in the way of animation tooling in Timeline which is suitable for animators

omer0622

Hi guys, I'm not sure if this is okay to ask here. I am beginning to using your custom timeline tool and have several questions:

-We need to use the [Animate] attribute to mark the fields that are going to adjusted along the timeline. However, is there a context to use the field inside of it , like to OnTimelineUpdate that run each frame in the timeline or something. Normally, I use a PlayableBehavior with a ProcessFrame method that operates each frame within the timeline."

-You have KeyframeSelectors to store keyframe data i guess. Is it intentional that its data is not displayed in the inspector, showing only the data type and time instead?

-Is the modular tool editor window the only way to edit timeline values? I assume I can integrate my tool modules. Would it make sense to adopt a method similar to Unity's Animator? Like start recording, adjust the properties of the components, and then tool automatically create/set a keyframe at the current position and then goes on."

marwi123

Hi <@338983472393617408> totally okay to ask here πŸ™‚ happy that you're starting with it. It's been a while for me so my memory might not be the most accurate anymore but I'll try to answer your questions as good as possible.

  • The fields that you mark with animate are exposed to the timeline tools and are then updated during a PlayableBehaviour event too (ProcessFrame as well) - the code for that is in Runtime/Timeline/CodeControlTrackMixer. Is your goal to modify those results from code or get a callback at runtime? You can implement the IAnimatedEvents interface on your monobehaviour to receive callbacks. Look at the Animated component in Runtime/Components - this can also be used as a base component for your scripts

  • It's semi intentional - I think i didnt get to it and it wasnt that important since everything was visualized by gizmos in the scene view. There are also some utility methods to do that I think (I'll check right now and let you know)

    • ^ Update on this: I think what I was referring to was the IOnionSkin interface - otherwise you can use the DrawGizmos callback to visualize your data (it really depends on what you're doing or what your data represents since it can be basically anything which the timeline can not really know) - if you want to add support for better display of values in the timeline you can extend it in Editor/Editors/CustomKEyframeEditorBase" or add CustomKeyframeEditorAttribute to your editor deriving from CustomKeyframeEditorBase with the keyframe type that you want to draw and implement OnInspectorGUI. The Targets array should then contain the keyframe
  • The workflow you're proposing is how it works (for some tools - e.g. the Spray Producer). Each custom timeline track has a record button - clicking it will start adding keyframes in the timeline once you use the tool. You can as well add and edit keyframes from code (e.g. using ClipAndKeyframeExtensions.AddKeyframeWithUndo using a custom clip)

marwi123

I hope this helps πŸ™‚ otherwise feel free to ask more! Happy to talk about it and try to improve where time and memory allows