setValueAtKey and addKey on Pictures

New Here ,
Jul 05, 2019 Jul 05, 2019

Copy link to clipboard

Copied

Hello everybody,

Can you say me if Premiere SDK supports addKey on pictures ?

When I attempt to add addKey (on opacity) on movies, it works, but if I try on pictures (.jpg, .png...), it doesn't work : I used this script (https://forums.adobe.com/thread/2471227)

I don't understand, anyone can help me ? 2 weeks that I'm looking for, I'm going crazy. Thank you.

    var proj = app.project; 

    var seq = proj.activeSequence; 

    var time = seq.getPlayerPosition(); // CTI = Current Time Indicator. 

    var time2 = seq.getPlayerPosition(); 

    var time3 = seq.getPlayerPosition(); 

    time2.seconds += 1; 

    time3.seconds += 2; 

    var videoTracks = seq.videoTracks; 

    var track = videoTracks[0]; 

        for (var j = 0; j < track.clips.numItems; j++) { 

            var clip = track.clips

                for (var k = 0; k < clip.components.numItems; k++) { 

                    var component = clip.components

                        // Trajectory 

                        for (var l = 0; l < component.properties.numItems; l++) { 

                            var property = component.properties

                            if (property.displayName == "Scale") { 

                                // Scale 

                                if (!property.isTimeVarying()) { 

                                    property.setTimeVarying(true); 

                                } 

                                property.addKey(time); 

                                property.addKey(time2); 

                                property.addKey(time3); 

                                var k = property.getKeys(); 

                                if (property.areKeyframesSupported() == true) { 

                                    var result = property.getValueAtKey(time); 

                                    property.setValueAtKey(time, 100, true); 

                                    property.setValueAtKey(time2, 200, true); 

                                    property.setValueAtKey(time3, 300, true); 

                                } 

                        } 

                    } 

               } 

        } 

TOPICS
Premiere Pro SDK, SDK

Views

750

Likes

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

Adobe Employee , Jul 11, 2019 Jul 11, 2019
You're right! I was able to reproduce the behavior. We're tracking this as DVAPR-4217831: "setValueAtKey() fails to work correctly, when applied to a still image; same code works fine when target is video".I'll keep you informed of our progress.

Likes

Translate

Translate
Adobe Employee ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

At first glance, it appears you're trying to set the value of opacity to 100, 200, than 300.


I think 100 is the maximum opacity value; you could check the opacity values of a still set to fully transparent, and one set to fully opaque. I'll have a look, time permitting.

Likes

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
New Here ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

In fact, I loop and I only select the property "Scale" and not opacity.

The value is changed but no keyframes are created, despite the 3 addKey statements.

Likes

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
Adobe Employee ,
Jul 11, 2019 Jul 11, 2019

Copy link to clipboard

Copied

You're right! I was able to reproduce the behavior.

We're tracking this as DVAPR-4217831: "setValueAtKey() fails to work correctly, when applied to a still image; same code works fine when target is video".

I'll keep you informed of our progress.

Likes

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
Community Beginner ,
Dec 23, 2019 Dec 23, 2019

Copy link to clipboard

Copied

Hi,

I'm having the same problem.

Is there a information?

 

Likes

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
Community Beginner ,
Apr 12, 2020 Apr 12, 2020

Copy link to clipboard

Copied

Hi.

I've been waiting for a long time.

Won't there be any information?

Likes

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
New Here ,
May 22, 2021 May 22, 2021

Copy link to clipboard

Copied

LATEST

Is there now a solution for this problem?

Likes

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
Community Beginner ,
Dec 30, 2019 Dec 30, 2019

Copy link to clipboard

Copied

can anyone solve it?

Likes

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