Record in Movie File Out Top's expression changes to constant automaticlly after a period of time

Hi there, I’m pretty new here. I was trying to do a live stable diffusion generative performance with TD, and set the Movie File Out Top to start recording when Kinect detects visitors.

I used a python expression to trigger the record. However the the expression box always changes to constant box by itself(see screenshots) and it’s pretty frustrating to have to toggle it back manually.

Any idea on what the problem might be and how do I change the code?

I doesnt understand why you use eval.
If you simply connect detection Chop to moviefileout Top
(activate the chop, drag the value to the “record” value and choose “CHOP reference”)
There is no problem.