In Timeline/custom Playables, how to get the original/current values of bound object when creating a new clip?

I followed Extending Timeline: A Practical Guide | Unity Blog and I’m trying to create a blendable asset as described in section (4) of the doc.

In my PlayableAsset subclass, I override CreatePlayable(). In the original sample code, there’s a template field for the initial value. How do I get the ‘original’ values (or even better, the current values at the point in the timeline where this clip is being created) of the bound target?

Even in the sample, when you create a new clip ( Mixer_LightControlTrack / Mixer_LightControlAsset), the actual target object gets its colour and intensity set to black and 0. Not so bad when they are simple to correct. Really painful when you have lots of data!

E.g. I’m animating a multi-part line which has several points. I wish to animate those points each frame. I create a new track, bind it to my game object’s line (the gameobject has several such lines). I then right click and create a new asset.

p.s. sorry if I’m using the wrong terms/whatever here – I’m very much still trying to wrap my head around extending Timeline so might be asking the wrong question!

The simplest way to do this is inside ProcessFrame, copy the original values from the trackBinding the first time you see it and use those as defaults

i`
if (!trackBinding)
return;

if (!firstFrame)
{
defaultIntensity = trackBinding.intensity;
defaultColor = trackBinding.color;
firstFrame = true;
}
finalIntensity = defaultIntensity;
finalColor = defaultColor;
`
note that you would need to add firstFrame, defaultIntensity and defaultColor as private members of the LightControlMixerBehaviour class.