Page 1 of 1

How to update UI apps ?

Posted: April 28th, 2009, 5:05 am
by sylvaimz
Hello,

I've a script that change PAR of the active comp for example...
but i've to unselect then reselect that comp to see the change...

Is there a function to update-refresh the UI of After effect ?

Thanks.

Re: How to update UI apps ?

Posted: February 23rd, 2017, 1:45 am
by sshahriyari
I Have a same question! 
sylvaimz wrote:Hello,

I've a script that change PAR of the active comp for example...
but i've to unselect then reselect that comp to see the change...

Is there a function to update-refresh the UI of After effect ?

Thanks.

Re: How to update UI apps ?

Posted: February 23rd, 2017, 6:36 am
by runegan
Do you have to close and reopen the comp? Or just deselect and select it in the project panel?

I can't see any function to close a comp, but if you have to close it, you could try creating a new comp, open it, with comp.openInViewer(), then opening the comp you have changed in the same way. This will hopefully make the composition viewer panel to update.]

If you just need to deselect and select in the project panel, you can use

Code: Select all

comp.selected = false
comp.selected = true
Hope this helps, haven't tried this so don't know if it works :)

Re: How to update UI apps ?

Posted: February 24th, 2017, 6:43 am
by beginUndoGroup
@runegan : you can close a comp this way:

comp.openInViewer();
app.executeCommand(4); // 4 is "Close"

Xavier