Skip to main content
Inspiring
December 1, 2017
Answered

Bug in app.projects list

  • December 1, 2017
  • 1 reply
  • 3480 views

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

This topic has been closed for replies.
Correct answer meett9325076

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.


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

Thanks,
Meet

1 reply

Inspiring
December 1, 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

Inspiring
December 1, 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

Participating Frequently
December 1, 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


Will using projects.path to disambiguate solve the problem?