Copy link to clipboard
Copied
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:
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
I have tested this in 12.1.2 and it works as expected. Thank you Bruce Bullis and the team.
Thanks,
Meet
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hello e.d.
Could you please try to replicate using below steps?
Thanks,
Meet
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thank you e.d.
This can also be replicated by copying the prproj file from the file system.
Thanks,
Meet
Copy link to clipboard
Copied
We're* looking into it.
* 'We' includes someone who's not on sabbatical, like I am.
Copy link to clipboard
Copied
Will using projects.path to disambiguate solve the problem?
Copy link to clipboard
Copied
No it won't.
Copy link to clipboard
Copied
Ok...why wouldn't that work?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
If you generate a copy using “Save As”, then the copies will have different file paths, and Jim’s suggestion will work correctly.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Aaaaah. Yeah, that's bad.
Copy link to clipboard
Copied
Hello Bruce Bullis,
Any update on this issue?
Thanks,
Meet
Copy link to clipboard
Copied
I think this is fixed in 12.0.1
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Bruce, yes. That is correct.
Thanks,
Meet
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Below are the steps:
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I have tested this in 12.1.2 and it works as expected. Thank you Bruce Bullis and the team.
Thanks,
Meet