ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Update panel when user switches Comps [scripting]

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index


Jay Brown
Update panel when user switches Comps [scripting]
on Mar 6, 2018 at 12:45:15 am

I've been trying to figure out a way for my dockable Panels to update when the user switch Comps. This is what I've come up with which seems to work pretty well. However I'm still a total novice at scripting and I just want to make sure that this is safe/the appropriate way of doing this. Thanks -J

MyComp = app.project.activeItem;
sTN = app.scheduleTask("checkComp()", 500, true);

checkComp = function(){
try{
test = w.size; // if this fails then the pallete (w) is actually closed and the task is canceled
if(MyComp != app.project.activeItem ){ // if MyComp value has changed
MyComp = app.project.activeItem;
alert("You switched Comps"); // replace with function
}
}catch(err){
app.cancelTask(sTN);
};
}


Posts Index 


Current Message Thread:
  • Update panel when user switches Comps [scripting] by Jay Brown on Mar 6, 2018 at 12:45:15 am





© 2019 CreativeCOW.net All Rights Reserved
[TOP]