Participant
November 15, 2020
Question
Different values for ES and AE (AME BrigeTalk)
- November 15, 2020
- 3 replies
- 537 views
Hi!
This is the code for checking if the render is done. I run it throught ESTK (After Effects) and wait when the render stops. But the problem is when I run it through ESTK (chosen ExtendScript Toolkit CC) it works fine: when the script starts, it writes true values in the console. BUT if I run it throught AE (chosen Adobe After Effects 2020) it just catch only the first "callback", only the first value of "isBatchRunning()". If I pause or stop the render, nothing happens, only the first value of "result" is displayed in the console. What am I doing wrong? Thanks!
var isRendering = true;
var myResult;
var bt = new BridgeTalk();
bt.target = "ame-14.0";
bt.body = "app.getEncoderHost().isBatchRunning()";
function infoFromAME() {
bt.onResult = function(msg){
resultFunction(msg.body)
}
bt.send();
}
function resultFunction (result){
myResult = result;
}
while (isRendering) {
infoFromAME()
if (myResult == "true"){
$.writeln('render is in progress');
}
else {
$.writeln('render is done');
}
}
GIF file is attached.
