ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Scripting Question

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jon Merrifield
Scripting Question
on Aug 7, 2012 at 9:33:44 pm

Before I dig in further and expand my javascript and scripting skills in AE, I have a question related to one thing I would like to try and achieve.

My question is "yes" or "no" and requires nothing further of your time.

I have a certain task I do often, change the Output Device and Output Mode of the AE Video Preview preference. Reason in parenthesis at the bottom if you must know.

QUESTION:
can I do this essentially macro or action function, changing preference parameters as it were, by writing a script?

Thank you,
-Jon

(so I can review heavy comps in realtime, checking animation timing etc, on the computer monitor only. Heavy comps (many layers, 2K etc.) often cannot get realtime ram previews through the Kona through my HD Element media raid and media cache , just saying... often switch back to Output device Kona for critical detail viewing during comp work. I make efficient of use of keyboard shortcuts but I would still like a macro, action, or script as it were for an even faster change to the video preview output preferences)

Jon Merrifield
VFX Artist / Supervisor
PELi Studios, Austin TX


Return to posts index

Dan Fredley
Re: Scripting Question
on Aug 8, 2012 at 4:25:47 pm

I don't think it's possible via ExtendScript or Applescript GUI scripting. You have to set it through the preferences in AE. But if you're on a Mac you can go to System Preferences and add a custom keyboard shortcut under Adobe After Effects and just type "Video Preview..." for the menu item and then assign it the keyboard shortcut you want and it will open the "Video Preview Preferences" for you--saves you from having to go to the menu>submenu at least.


Return to posts index

Jon Merrifield
Re: Scripting Question
on Aug 8, 2012 at 5:32:21 pm

Thanks Dan,

One step less helps of course. I have just been using the [command] : shortcut to get to the preferences and thinking about how to write a script for the whole thing every time I do.

thanks again. Now I can put both pant legs on at the same time even if I still have to zip and button them.

Jon Merrifield
VFX Artist / Supervisor
PELi Studios, Austin TX


Return to posts index


Dan Fredley
Re: Scripting Question
on Aug 8, 2012 at 6:32:43 pm

This script "tricks" AE into setting the video preview device to "Computer Monitor Only", but there seems to be no way to set the preference to a specific device, so you'll have to use the above solution to switch back to your external video output:

{
app.preferences.savePrefAsString("MacOS Video Preview Pref Section", "Device", "Computer Monitor Only");
app.preferences.saveToDisk();
app.preferences.reload();
}


Including "Computer Monitor Only" in the first line of code really doesn't matter--it basically sets the preference to an unknown device, forcing AE to default to "Computer Monitor Only" behind the scenes. I only wrote it out literally to show what the script is trying to do even though it doesn't mean anything. If that makes sense. It gets you one step closer.


Return to posts index

Jon Merrifield
Re: Scripting Question
on Aug 8, 2012 at 8:23:30 pm

Thanks so much for your time.
I learned something and got more than I asked for.
My hat, (and my hair).. are off.
cheers

Jon Merrifield
VFX Artist / Supervisor
PELi Studios, Austin TX


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]