Copy link to clipboard
Copied
Hello guys,
I've noticed in the last commit of GitHub - Adobe-CEP/Samples: Code samples for CEP extensions new event called "onProjectChanged" with a commented out line at Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub . I've decided to test this new (?) functionality (I'm using Adobe Premiere Pro CC Version 12.1.1) and removed the slashes. I've expected, that this event will be triggered by any kind of project manipulation, however it wasn't triggered at all: I've tried changing sequences, adding another video to the project, renaming sequences etc. Is there anything I'm doing or understanding wrong?
Regards
Ilya
Copy link to clipboard
Copied
Try having just one project open; do the changes get registered now?
Copy link to clipboard
Copied
No. There is currently only one project open. The function registerProjectChangedFxn being called as expected at the panel load, but myOnProjectChanged function is not getting triggered.
Copy link to clipboard
Copied
Does PProPanel successfully respond to onProjectChanged events? [Open PPro's Events panel, to confirm.]
Copy link to clipboard
Copied
I'm not sure if I understood you right, following has been done: opened window -> events. Everything, what I see are some invalid fonts warnings and "<number> items selected: <sequence name>" information logs. Here is myOnProjectChanged function:
myOnProjectChanged : function(documentID){
var msg = 'Project with ID ' + documentID + ' Changed.';
// Commented out, as this happens a LOT.
$._PPP_.updateEventPanel(msg);
app.setSDKEventMessage(msg, 'info');
alert("project changed");
},
Copy link to clipboard
Copied
If I uncomment the updateEventPanel() line in PProPanel, the message is posted correctly.
Copy link to clipboard
Copied
Ok, let's inspect why I don't have the same behavior.
Which particular action should be done to trigger onProjectChanged event? (I've tried creating sequence, changing length of video in sequence, placing new video in sequence, creation of new project etc.) Which version and platform do you use to perform the test? (I've tested with Version 12.1.1 and 12.1.0 under Mac).
Is there any documentation to the events we can listen for at all?
Copy link to clipboard
Copied
> Let's inspect why I don't have the same behavior.
Where does your implementation depart from PProPanel's working implementation?
I have no idea why you'd want to create a sequence every time the project's contents change.
No, there is no documentation yet; we provide working code first.
Copy link to clipboard
Copied
I have no idea why you'd want to create a sequence every time the project's contents change.
I've created a sequence to trigger the "onProjectChanged" event. As I've already mentioned, I've tried also following actions to trigger the event:
creating sequence, changing length of video in sequence, placing new video in sequence, creation of new project etc.
So, once more, should any of these actions trigger onProjectChanged? If so, please let me know if you are using any other version of Adobe Premiere than me. (I've tested with Version 12.1.1 and 12.1.0 under Mac)
Where does your implementation depart from PProPanel's working implementation?
Here are the differences to the current master version of PLremiere.jsx file (this is the only file I changed). Notice: I'm calling "loaded" alert in registerProjectChangedFxn, this alert works as expected.
diff --git a/PProPanel/jsx/PPRO/Premiere.jsx b/PProPanel/jsx/PPRO/Premiere.jsx
index f019e7f..30f8ac2 100644
--- a/PProPanel/jsx/PPRO/Premiere.jsx
+++ b/PProPanel/jsx/PPRO/Premiere.jsx
@@ -1662,13 +1662,15 @@ $._PPP_={
},
myOnProjectChanged : function(documentID){
+ alert("project changed");^M
var msg = 'Project with ID ' + documentID + ' Changed.';
// Commented out, as this happens a LOT.
- // $._PPP_.updateEventPanel(msg);
+ $._PPP_.updateEventPanel(msg)^M
},
registerProjectChangedFxn : function() {
app.bind('onProjectChanged', $._PPP_.myOnProjectChanged);
+ alert('loaded');^M
},
confirmPProHostVersion : function() {
(END)
Copy link to clipboard
Copied
> should any of these actions trigger onProjectChanged?
Yes; see screen video of PProPanel.
Dropbox - functioning_correctly.mp4
More specifics on what does and does not constitute a project change:
New sequence: yes
Change length of sequence: no
Add anything to project: yes
New project: no
So, those specifics aside; what workflows are you trying to support?
Copy link to clipboard
Copied
As far as I see, following functions were triggered: "onItemAddedToProject", "projectPanelSelectionChanged". So "onProjectChanged" has never been called by you neither, otherwise (if you removed slashes at line 1667 in Premiere.jsx) we would see 'Project with ID <documentID> Changed'.
What I am trying to do is to detect, if another sequence was selected ( = active sequence is changed), the sequence has been renamed or the structure of sequence has been changed. I was hoping, that "onProjectChanged" event is triggered by Premiere itself, to make it possible to act somehow to the project changes. Otherwise I don't understand including functions myOnProjectChanged and registerProjectChangedFxn to the samples - myOnProjectChanged is never called.