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

Bug in app.projects list

Participant ,
Nov 30, 2017 Nov 30, 2017

Hello All,

I am trying to search project (by it's path) from the app.projects list but I found that the app.projects list in not updated correctly. See below steps:

  • Open a project called test_1.prproj (Either from the UI or from the API)
  • Open another project called test_2.prproj (Either from the UI or from the API)
  • Display projects name using below code:

for (var i = 0; i < app.projects.numProjects; i++) {

      $.writeln(app.projects.name);

}

I got below output:

test_2.prproj

test_2.prproj

Which means all the projects have been replaced with last opened project. So we can't search a project from app.projects. This clearly looks a bug in the API.
Is there any other way to search a project from all opened projects?


Premiere Pro Version: 12.0.0
Extension Type: Panel


Thanks & Regards,
Meet Tank

TOPICS
SDK
3.3K
Translate
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

Participant , Sep 27, 2018 Sep 27, 2018

I have tested this in 12.1.2 and it works as expected. Thank you Bruce Bullis​ and the team.

Thanks,
Meet

Translate
Engaged ,
Dec 01, 2017 Dec 01, 2017

Hi Meet,

just did a quick test in ExtendScript Toolkit CC, and it's working for me.

What's worth noting is the order is "reverse", so the project opened last is being pushed to the beginning of the array, not appended at the end.

Best,

Erik

Translate
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
Participant ,
Dec 01, 2017 Dec 01, 2017

Hello e.d.

Could you please try to replicate using below steps?

  • Create a new project from UI e.g. test_1.prproj
  • Save as this project as test_2.prproj
  • Open the project test_1.prproj
  • Display project names from app.projects

Thanks,
Meet

Translate
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
Engaged ,
Dec 01, 2017 Dec 01, 2017

Hi Meet,

okay, now it's as you have described!

When inspecting the documentID, you'll find it's the same for both projects, so there's definitely a bug here. PrPro should create a new documentID when "Save as.." is being used. Bruce Bullis​, can you please confirm and file a bug report?

Steps to reproduce:

Create two projects as described above.

Run

for (i = 0; i < app.projects.numProjects; i++) {

        $.writeln(app.projects.name);

        $.writeln(app.projects.documentID);

}

Result:

test_2018_01.prproj

a55f772b-9100-44e7-b749-7f1bfc89e7f9

test_2018_01.prproj

a55f772b-9100-44e7-b749-7f1bfc89e7f9

Close the second project and re-open, re-run script.

Result:

test_2018_02.prproj

a55f772b-9100-44e7-b749-7f1bfc89e7f9

test_2018_02.prproj

a55f772b-9100-44e7-b749-7f1bfc89e7f9

Best,

Erik

Translate
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
Participant ,
Dec 01, 2017 Dec 01, 2017

Thank you e.d.

This can also be replicated by copying the prproj file from the file system.

Thanks,
Meet

Translate
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 ,
Dec 01, 2017 Dec 01, 2017

We're* looking into it.

* 'We' includes someone who's not on sabbatical, like I am.

Translate
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 01, 2017 Dec 01, 2017

Will using projects.path to disambiguate solve the problem?

Translate
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
Engaged ,
Dec 02, 2017 Dec 02, 2017

No it won't.

Translate
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 ,
Dec 02, 2017 Dec 02, 2017

Ok...why wouldn't that work?

Translate
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
Engaged ,
Dec 03, 2017 Dec 03, 2017

Because the object itself is a wrong duplicate, so every property of this object instance is identical to its neighbor and no use for disambiguation.

Translate
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 ,
Dec 04, 2017 Dec 04, 2017

I don't understand why/how it can be a wrong duplicate, if you're differentiating based on path.

If the path is distinct, are not all the other properties also distinct?

PPro won't open the same project, from the same path, twice.

Translate
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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Hi Bruce,

of course you can't open the same project (read: file on disk) twice. But if you generate a copy by "Save as..." as described above, this applies. This is what this is all about.

Best,

Erik

Translate
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 ,
Dec 04, 2017 Dec 04, 2017

If you generate a copy using “Save As”,  then the copies will have different file paths, and Jim’s suggestion will work correctly.

Translate
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 04, 2017 Dec 04, 2017

Also, given that the document id is contained in the project file, if you copy the project file at the OS-level, the copy of the project file will necessarily have a duplicate document id. So as things stand there's no way to universally avoid document id duplication.  The file path of the original file and the copied file, however, are necessarily distinct.

Translate
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
Engaged ,
Dec 04, 2017 Dec 04, 2017

When performing a "Save-As" on my system, then re-opening the source file as second project, both ID and path are identical in app.projects. 😞

Translate
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 ,
Dec 04, 2017 Dec 04, 2017

Aaaaah. Yeah, that's bad.

Translate
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
Participant ,
Feb 01, 2018 Feb 01, 2018

Hello Bruce Bullis​,
Any update on this issue?

Thanks,
Meet

Translate
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 ,
Feb 01, 2018 Feb 01, 2018

I think this is fixed in 12.0.1

Translate
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
Participant ,
Feb 06, 2018 Feb 06, 2018

Hi Bruce Bullis​,

I have upgraded Premiere Pro to version 12.0.1 (Build 69). The issue is still exists in this version.

Thanks,
Meet

Translate
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 ,
Feb 07, 2018 Feb 07, 2018

Meet, that would be startling.

Can you confirm that opening TWO instances of a project, with the same ID and two distinct paths, PPro's API returns the SAME path for both projects?

Translate
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
Participant ,
Feb 07, 2018 Feb 07, 2018

Bruce, yes. That is correct.

Thanks,
Meet

Translate
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 ,
Feb 07, 2018 Feb 07, 2018

That's not the behavior we see; here's a screenie showing successful differentiation between projects, based on path and DocID.

If you can provide step-by-step instructions (or better, ExtendScript snippets) on how you can get PPro to confuse those two projects, please send them.

Translate
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
Participant ,
Feb 07, 2018 Feb 07, 2018

Below are the steps:

  • Create a new project from UI e.g. test_1.prproj
  • Save as this project as test_2.prproj
  • Open the project test_1.prproj
  • Run below code snippet to display their properties

for (var i = 0; i < app.projects.numProjects; i++) {

      $.writeln(app.projects.name);

      $.writeln(app.projects.documentID);

      $.writeln(app.projects.path);

}

Output:

test_1.prproj

fcb6bf4e-15ad-47a6-9a5f-9f88ad26a882

\\?\D:\premiere_pro_projects\test_1.prproj

test_1.prproj

fcb6bf4e-15ad-47a6-9a5f-9f88ad26a882

\\?\D:\premiere_pro_projects\test_1.prproj


Thanks,
Meet

Translate
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 ,
Feb 08, 2018 Feb 08, 2018

Can't argue with that; nicely done!

I've helped contribution to confusion, here; because we operate in the not-too-distant future, I'd tested with a dev build, in which this issue IS fixed. Meet's right, it's still in 12.0.1.

Translate
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
Participant ,
Sep 27, 2018 Sep 27, 2018
LATEST

I have tested this in 12.1.2 and it works as expected. Thank you Bruce Bullis​ and the team.

Thanks,
Meet

Translate
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