How to get value of channel at given time? Evaluate_keys not working correctly!

Hi there,

I was developing a more complex editor utility widget using python that can tweak the face of a metahuman.

In my first test/dev sequence everything except a few bugs worked fine (I wanted to solve them later). Then I tested in other sequences and I noticed that the evaluate_keys function in some cases just returns None or gives back wrong values.

There is not much about this function in the documentation, but after reading this thread Get Value of Level Sequencer Curve? and also making a lot of tests in the beginning in my first test/dev sequence it did exactly what I wanted it to do: Read channel values when…

  • there was none key and none default value
  • there was a default value
  • there were one or multiple keys

…it seemed to do the job.

For that I used:

value = channel.evaluate_keys(unreal.SequencerScriptingRange(True, True, frame-1, frame+1), frame_rate)

The inputs frame and frame_rate were tested and a 100% correct. The correct channel was of course also used.

It seems also that the same frames don’t work in different sequences (with different data in it!). For example the frame 156 always returns None in multiple sequences. Shifting the key or keys one single frame further to get the same value there and it works!? Also you can get a value by using frame-2 and frame+2, but this doesn’t work on frame 1 which is not working correctly in other sequences as well.

Also I had a case where I made a blend between 0.3 and 0.4, but the script always read 0.3 only, no matter which frame I read from.

What I am doing wrong or is this a bug?

Best regards,
Marcus

1 Like

Engine version is 5.0.3

Hey, can anyone confirm this wrong behaviour or tell me where the mistake is and in best case provide a solution? I am currently very frustrated. We have a hack running that works in many cases for our purpose where we turn off some sections and then read values from the control rig, but this of course is a bad solution since the control rig only returns values in the range 0-1.

The evaluate_keys function also didn’t work in 5.2 BTW

Any help is appreciated.