• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

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.

TOPICS
Error or problem , Expressions , Scripting

Views

236

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Feb 11, 2022 Feb 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.
 

Votes

Translate

Translate
Enthusiast ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

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.
 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

LATEST

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines