Skip to main content
Abdelkrim Ibrahim
Participating Frequently
February 11, 2022
Answered

Copy keyframe value from "Levels" effect "Histogram" property with Extendscript

  • February 11, 2022
  • 1 reply
  • 632 views

Hello;

 

I'm working on a portion of a script that shifts all properties keyframes in time and remap them to a certain duration.

I have layer that have the "Levels" effect animated. When the script reaches the "Histogram", animated property of the Levels effect.

The script works perfectly for other layers and all properties, except for the Levels effect and it's animated property.

It gets stuck, and stops the execution when I try to copy the keyframe value of the Levels effect with this command.

curKeyValue = propertyInput.keyValue(i);

 

So I'm wondering, how can I copy the value of this property via Extend Script.

Is there any other command or work around to copy the value of such property.

 

Thank you so much for reading this post.

I really appreciate your help.

This topic has been closed for replies.
Correct answer Paul Tuersley

Scripts can't read/write the values of custom data types. You can check for them by checking the property.propertyValueType:

if (property.propertyValueType == PropertyValueType.CUSTOM_VALUE)
 
I realise this messes up your idea for this script. I guess you'll have to either accept it won't work for all keyframes or find a different approach.
 

1 reply

Paul TuersleyCorrect answer
Inspiring
February 11, 2022

Scripts can't read/write the values of custom data types. You can check for them by checking the property.propertyValueType:

if (property.propertyValueType == PropertyValueType.CUSTOM_VALUE)
 
I realise this messes up your idea for this script. I guess you'll have to either accept it won't work for all keyframes or find a different approach.
 
Abdelkrim Ibrahim
Participating Frequently
February 11, 2022

Thank you for your help.

I didn't really think that scripts has such limitations.

I thought at first, that you can do anything with scripts.

I guess, I have to find another approach.