Skip to main content
Participant
April 8, 2025
Answered

valueAtTime() for Levels Properties

  • April 8, 2025
  • 1 reply
  • 337 views

Hi! I'm trying to export various properties to a file for each frame of an animation, and I'm a bit stumped.

 

I've been able to pick up frame data for other Effects, such as hue and saturation within Color Balance (HLS) effect. like so:

layer.property("Effects").property("Color Balance (HLS)").property("Hue").valueAtTime(time, false)

 

However, when I go to do so for various Levels properties (Input Black, Input White, Gamma), it only gives me the data for the frame I currently have selected in the timeline. The only thing I can guess is that TECHNICALLY the stopwatch icon is on the Histogram property, and those are some sort of sub-property that only show up in the effect controls. But not sure if there's a way to get these numbers from the histogram itself in a script? I've tried doing e.g. property("Histogram").property(1) but not having any luck there. Using Property("Histogram") at all seems to just make the script not run at all.

 

Any help would be appreciated! Thank you!

 

Thank you!

Correct answer Dan Ebberts

I think that data is encoded in the Histogram value, which has a propertyValueType of PropertyValueType.CUSTOM_VALUE, which means the data itself is inaccessible to scripting. I don't know if it helps, but maybe you could switch to the Levels (Individual Controls) effect, where all the individual parameters are keyframeable and accessible with valueAtTime().

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
April 8, 2025

I think that data is encoded in the Histogram value, which has a propertyValueType of PropertyValueType.CUSTOM_VALUE, which means the data itself is inaccessible to scripting. I don't know if it helps, but maybe you could switch to the Levels (Individual Controls) effect, where all the individual parameters are keyframeable and accessible with valueAtTime().

lwalkerspAuthor
Participant
April 11, 2025

Thanks! Yes that's precisely what I ended up doing. There's lots of extra settings there that will need to be ignored for my purposes (only using the RGB controls), but it at least functions!