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

How to keep the original selected elements unchanged after Inserts keyframes

Explorer ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

I selected 5 elements in a single layer and lost the original selection after using the following command. How can I still keep the original selection after Inserts keyframes?
fl.getDocumentDOM().getTimeline().insertKeyframe();

TOPICS
Exchange extensions , How to , Timeline

Views

217

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 Expert ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

save them

then reselect with jsfl after taking deselecting steps.

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 ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

Can you provide specific jsfl code?

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
Community Expert ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

use the api. i'm on my mobile phone.

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
Community Expert ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

back at computer

 

var selectedA = fl.getDocumentDOM().selection;

fl.getDocumentDOM().getTimeline().insertKeyframe();

 

// you may want to deselect everything here

 

for(var i=0;i<selectedA.length;i++){

selectedA[i].selected = true;

}

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 ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

It's strange that after testing, the selected element is not restored

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 ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

The previous keyframe remains selected, but the current keyframe is not selected

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
Community Expert ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

how are you using the code i suggested?  ie, you select on-stage objects, then you execute the amended script so you insert a keyframe where desired and still have the selected objects, selected.

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 ,
Dec 20, 2023 Dec 20, 2023

Copy link to clipboard

Copied

LATEST

Yes, I followed the steps you mentioned to execute jsfl, but after inserting keyframes, the object is not automatically selected.

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