FORUMS: list search recent posts

Update panel when user switches Comps [scripting]

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
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(){
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

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved