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
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.
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?
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.
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.
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.
Copy link to clipboard
Copied
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.