• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible change Adobe Premiere Preferences using ExtendScript?

Enthusiast ,
Aug 07, 2018 Aug 07, 2018

Copy link to clipboard

Copied

Is it possible to change Adobe Premiere Preferences using ExtendScript?

Specifically looking to control Preferences > Media > Timecode and choose from one of the three available options using ExtendScript.

TOPICS
SDK

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 07, 2018 Aug 07, 2018

This seems to work here:

  var prefToModify = 'BE.Prefs.General.ClipInOutWithMediaOffset';

  var appProperties = app.properties;

  if (appProperties){

  var propertyExists = app.properties.doesPropertyExist(prefToModify);

  var propertyIsReadOnly = app.properties.isPropertyReadOnly(prefToModify);

  var originalValue = app.properties.getProperty(prefToModify);

  appProperties.setProperty(prefToModify, false, 1, 2); // optional 3rd param : 0 = non-persistent,  1 = persistent (default)

  var safetyCheck =

...

Votes

Translate

Translate
Adobe Employee ,
Aug 07, 2018 Aug 07, 2018

Copy link to clipboard

Copied

Yes, some-but-not-all prefs are scriptable.

For that pref, I see two choices; 'start at 00:00:00:00' and 'Use Media Source'...what third option do you see?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 07, 2018 Aug 07, 2018

Copy link to clipboard

Copied

You're right. Typo on my end. Only those two.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 07, 2018 Aug 07, 2018

Copy link to clipboard

Copied

This seems to work here:

  var prefToModify = 'BE.Prefs.General.ClipInOutWithMediaOffset';

  var appProperties = app.properties;

  if (appProperties){

  var propertyExists = app.properties.doesPropertyExist(prefToModify);

  var propertyIsReadOnly = app.properties.isPropertyReadOnly(prefToModify);

  var originalValue = app.properties.getProperty(prefToModify);

  appProperties.setProperty(prefToModify, false, 1, 2); // optional 3rd param : 0 = non-persistent,  1 = persistent (default)

  var safetyCheck = app.properties.getProperty(prefToModify);

  if (safetyCheck == 'false'){

  alert("Now using 00:00:00:00 for media start time.");

  } else {

  alert("Now adopting start time from media source.");

  }

  } else {

  alert("Properties not found.");

  }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 07, 2018 Aug 07, 2018

Copy link to clipboard

Copied

Brilliant.

Will test soon

Is there a listing of Preference Properties somewhere?

Here are some others that leap to mind for that would come in handy:

Preferences > Timeline > Video Transition Default Duration

Preferences > Timeline > Audio Transition Default Duration

Preferences > Playback > Video Device

File > Project Settings > General > Display the project item name and label color for all instances

UPDATE

Listing of properties in file "Adobe Premiere Pro Prefs" where you can find "Video" as well as "Audio Default Duration" and many more.

Correct?

SLIGHT ISSUE

Updating "BE.Prefs.General.ClipInOutWithMediaOffset" does not immediately change the time code in the currently loaded source monitor.

It needs to be re-loaded.  Question: Is there a way to "refresh" the source monitor programmatically to achieve this?

QUESTION

RE "appProperties.setProperty(prefToModify, false, 1, 2); // optional 3rd param : 0 = non-persistent,  1 = persistent (default)"

I get the 1st, 2nd & 3rd parameters.  What's the 4th?

QUESTION

Is it possible for ExtendScript to change File > Project Settings > General > Display the project item name and label color for all instances

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

Is there a listing of Preference Properties somewhere?

No; PPro doesn't write all prefs into the prefs file; only those that vary from default.

Recommended approach:

  1. copy your PPro prefs --> 'prefs copy'.
  2. Launch PPro.
  3. Change ONLY the pref in which you're interested.
  4. Close PPro.
  5. Use a file diffing utility to compare current prefs with 'prefs copy'.

[That's how I found the Media --> Timecode display you referenced.]

Is there a way to "refresh" the source monitor programmatically to achieve this?

I don't think so; having the user change workspaces might do it.

Is it possible for ExtendScript to change File > Project Settings > General > Display the project item name and label color for all instances

No; that's a project setting, not a pref. The API does offer control over scratch disk paths, and the label color of each projectItem.

What's the 4th?

Just classic off-by-one error, like your three options for the original pull-down. It should read 'optional 3rd parameter'.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

https://forums.adobe.com/people/Bruce+Bullis  wrote

Is there a listing of Preference Properties somewhere?

No; PPro doesn't write all prefs into the prefs file; only those that vary from default.

Recommended approach:

  1. copy your PPro prefs --> 'prefs copy'.
  2. Launch PPro.
  3. Change ONLY the pref in which you're interested.
  4. Close PPro.
  5. Use a file diffing utility to compare current prefs with 'prefs copy'.

Great! Helpful.

Is there a way to "refresh" the source monitor programmatically to achieve this?

I don't think so; having the user change workspaces might do it.

Another potentially effective use of the yet-to-be-invented Load Project Item in Source Panel (Is it possible to load a bin item in the Source or Program Panel? ), assuming programmatically loading a different item and then re-loading the prior would effectively update the source panel's timecode.

Is it possible for ExtendScript to change File > Project Settings > General > Display the project item name and label color for all instances

No; that's a project setting, not a pref. The API does offer control over scratch disk paths, and the label color of each projectItem.

Suggesting as a feature request: It would be valuable to be able to toggle the Timeline to show Project Item names vs Clip Item names at the click of a button.

What's the 4th?

Just classic off-by-one error, like your three options for the original pull-down. It should read 'optional 3rd parameter'.

It does read 'optional 3rd parameter'.  It's just that there's also a mysteriously unexplained 4th parameter listed in your example above and on other CEP Sample pages

(appProperties.setProperty(prefToModify, false, 1, 2);  //  What's that "2" all about?)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

It's a comment bug; my comment should refer to the fourth parameter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

https://forums.adobe.com/people/Bruce+Bullis  wrote

It's a comment bug; my comment should refer to the fourth parameter.

In that case, what's the 3rd parameter?

appProperties.setProperty(prefToModify, false, 1, 2)

Current understanding is as follows:

Parameter 1: prefToModify

Parameter 2: Value you want to set that pref to.

Parameter 3: Either this is the persistence parameter -- and Parameter 4 is a mystery parameter

Parameter 4: Or this is the persistence parameter -- and Parameter 3 is the mystery parameter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

LATEST

From the code behind the call (I'll update the sample and docs):

param 1 = "Which Preference key are we modifying?"

param 2 = "What is the new value for that preference?"

param 3 = "Should this value persist?"

param 4 = "Should this value be created in the prefs, even if no value was present before?"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines