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

ExtendScript: How to create a sequence directly to a specific bin?

Community Beginner ,
May 10, 2024 May 10, 2024

Copy link to clipboard

Copied

My extension requires creating a sequence to a specified bin. When I create it using app.project.createNewSequence(), it places it in rootItem by default, which can be fixed by doing sequence.projectItem.moveBin(). This is fine, except that the view jumps to the root rather than staying in the view it originally was in (the extension deals with generating bin structures a lot), which doesn't make sense from a UX perspective.

 

Another possible alternative solution could be forcing the view back to where it initially was at the end of the batch operation. Or are there better solutions out there?

 

Are any of these possible? Thanks in advance.

 

Are 

TOPICS
SDK

Views

191

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

Community Beginner , May 20, 2024 May 20, 2024

In the end, I used app.project.createNewSequenceFromClips() instead of createNewSequence, as the former provides a way to directly specify the target bin and doesn't cause the view to jump between bins, as the latter does.

Votes

Translate

Translate
Adobe Employee ,
May 10, 2024 May 10, 2024

Copy link to clipboard

Copied

If you create the sequence, then move it to the correct bin, can you force the view back to the sequences location, by setting the selection?

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 Beginner ,
May 10, 2024 May 10, 2024

Copy link to clipboard

Copied

I have tried this: 

app.setProjectViewSelection([initialBin], viewIDs[0]);

 

I must clarify that this is only extra visible when in Icon view. The above code works, as I can see when in List view that it selects the projectItem referred to by "initialBin". However, in Icon view where initialBin is not visible, there won't be any noticeable change.

 

My intention is to keep the view where it originally was. For example, if my initial bin is Untitled.prproj\Bin1, then I run the batch operations which creates Untitled.prproj\Bin1\Bin2 and a sequence that the SDK places in the rootItem, which causes the view jump when in Icon view. Even with the sequence.projectItem.moveBin() performed, the view stays on the rootItem.

Ideally, I want it to stay in Untitled.prproj\Bin1 during the whole operation and not have any visible movement when in the Icon view. Otherwise, it may be good enough if I can move back from where the initial bin/view was.

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
Adobe Employee ,
May 11, 2024 May 11, 2024

Copy link to clipboard

Copied

Sorry, I left some ambiguity...

I didn't mean selection, in a view context; I was wondering whether projectItem.select() could be used to refocus the view on the desired target.

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 Beginner ,
May 13, 2024 May 13, 2024

Copy link to clipboard

Copied

What I tried was that I saved the initial active bin "initialBin" before performing the batch operations, and then in the end I did "initialBin.select()". I saw in List view that it highlighted/selected the initial bin, but in Icon view, it doesn't show any visible activity (as the selection was outside the view).

 

I was wondering whether there's a way to go back to the same view it originally was.

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 Beginner ,
May 20, 2024 May 20, 2024

Copy link to clipboard

Copied

LATEST

In the end, I used app.project.createNewSequenceFromClips() instead of createNewSequence, as the former provides a way to directly specify the target bin and doesn't cause the view to jump between bins, as the latter does.

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