Skip to content

Commit b50b7df

Browse files
added broadcastPrefsChanged
1 parent 38de708 commit b50b7df

File tree

1 file changed

+72
-44
lines changed

1 file changed

+72
-44
lines changed

docs/application/application.md

Lines changed: 72 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ parseInt(app.build); // 45
5858
Provides access to Adobe Media Encoder (on the same system).
5959

6060
!!! warning
61-
`app.encoder` is broken on Premiere Pro 14.3.1 - 15 on Mac only. Fixed in 22 and up. [See this discussion](https://community.adobe.com/t5/premiere-pro-discussions/missing-the-object-app-encoder-14-3-1-15-0-15-1-15-2/m-p/12544488).
61+
`app.encoder` is broken on Premiere Pro 14.3.1 - 15 on Mac only. Fixed in 22 and up. [See this discussion](https://community.adobe.com/t5/premiere-pro-discussions/missing-the-object-app-encoder-14-3-1-15-0-15-1-15-2/m-p/12544488).
6262

6363
#### Type
6464

@@ -353,7 +353,7 @@ String; read-only.
353353

354354
#### Example
355355

356-
Get a version of a current application *(Adobe Premiere Pro version 14.3.1 (Build 45))*
356+
Get a version of a current application _(Adobe Premiere Pro version 14.3.1 (Build 45))_
357357

358358
```js
359359
app.version; // 14.3.1
@@ -448,7 +448,7 @@ Determines whether the file at path can be opened as a Premiere Pro [project](..
448448

449449
#### Parameters
450450

451-
| Parameter | Type | Description |
451+
| Parameter | Type | Description |
452452
| --------- | ------ | ----------------- |
453453
| `path` | String | A path to a file. |
454454

@@ -461,10 +461,10 @@ Returns `true` if file can be opened as a Premiere Pro [project](../general/proj
461461
Test for valid project files
462462

463463
```js
464-
app.isDocument('~/Desktop/myProject.prproj'); // true
465-
app.isDocument('~/Desktop/textFile.txt'); // false
466-
app.isDocument('~/Desktop/footageFile.mov'); // false
467-
app.isDocument('~/Desktop/imageFile.mov'); // false
464+
app.isDocument("~/Desktop/myProject.prproj"); // true
465+
app.isDocument("~/Desktop/textFile.txt"); // false
466+
app.isDocument("~/Desktop/footageFile.mov"); // false
467+
app.isDocument("~/Desktop/imageFile.mov"); // false
468468
```
469469

470470
---
@@ -497,9 +497,9 @@ Creates a new .prproj [Project object](../general/project.md), at the specified
497497

498498
#### Parameters
499499

500-
| Parameter | Type | Description |
500+
| Parameter | Type | Description |
501501
| --------- | ------ | -------------------------------------------------------------------- |
502-
| `path` | String | A full path to new project; a .prproj extension will *not* be added. |
502+
| `path` | String | A full path to new project; a .prproj extension will _not_ be added. |
503503

504504
#### Returns
505505

@@ -517,7 +517,7 @@ Opens the file at the specified path, as a Premiere Pro [Project object](../gene
517517

518518
#### Parameters
519519

520-
| Parameter | Type | Description |
520+
| Parameter | Type | Description |
521521
| -------------------------- | ------- | --------------------------------------------------------------- |
522522
| `path` | String | Full path to the document to be opened. |
523523
| `suppressConversionDialog` | Boolean | Optional. Suppress project conversion dialog. |
@@ -541,7 +541,7 @@ Opens an FCP XML file as a Premiere Pro [Project object](../general/project.md)
541541

542542
#### Parameters
543543

544-
| Parameter | Type | Description |
544+
| Parameter | Type | Description |
545545
| ---------- | ------ | ----------- |
546546
| `path` | String | |
547547
| `projPath` | String | |
@@ -580,7 +580,7 @@ Determines whether proxy usage is currently enabled.
580580

581581
#### Parameters
582582

583-
| Parameter | Type | Description |
583+
| Parameter | Type | Description |
584584
| --------- | ------- | ----------------------------------------- |
585585
| `enabled` | Integer | `1` turns proxies on, `0` turns them off. |
586586

@@ -600,7 +600,7 @@ Whether extension with the given extensionID persists, within this session.
600600

601601
#### Parameters
602602

603-
| Parameter | Type | Description |
603+
| Parameter | Type | Description |
604604
| ------------- | ------- | ------------------------------------------------------------- |
605605
| `extensionID` | String | Which extension to modify. |
606606
| `persistent` | Integer | Pass `1` to keep extension in memory, `0` to allow unloading. |
@@ -612,7 +612,7 @@ Returns `true` if successful.
612612
#### Example
613613

614614
```js
615-
var extensionID = 'com.adobe.PProPanel';
615+
var extensionID = "com.adobe.PProPanel";
616616
// 0 - while testing (to enable rapid reload);
617617
// 1 - for "Never unload me, even when not visible."
618618
var persistent = 0;
@@ -632,21 +632,20 @@ Specifies the path to be used for one of Premiere Pro's scratch disk paths.
632632

633633
#### Parameters
634634

635-
636635
+-------------------+------------------------+-------------------------------------------------+
637-
| Parameter | Type | Description |
636+
| Parameter | Type | Description |
638637
+===================+========================+=================================================+
639-
| `path` | String | The new path to be used. |
638+
| `path` | String | The new path to be used. |
640639
+-------------------+------------------------+-------------------------------------------------+
641640
| `scratchDiskType` | `ScratchDiskType` enum | Enumerated value, must be one of the following: |
642-
| | | |
643-
| | | - `ScratchDiskType.FirstVideoCaptureFolder` |
644-
| | | - `ScratchDiskType.FirstAudioCaptureFolder` |
645-
| | | - `ScratchDiskType.FirstVideoPreviewFolder` |
646-
| | | - `ScratchDiskType.FirstAudioPreviewFolder` |
647-
| | | - `ScratchDiskType.FirstAutoSaveFolder` |
648-
| | | - `ScratchDiskType.FirstCCLibrariesFolder` |
649-
| | | - `ScratchDiskType.FirstCapsuleMediaFolder` |
641+
| | | |
642+
| | | - `ScratchDiskType.FirstVideoCaptureFolder` |
643+
| | | - `ScratchDiskType.FirstAudioCaptureFolder` |
644+
| | | - `ScratchDiskType.FirstVideoPreviewFolder` |
645+
| | | - `ScratchDiskType.FirstAudioPreviewFolder` |
646+
| | | - `ScratchDiskType.FirstAutoSaveFolder` |
647+
| | | - `ScratchDiskType.FirstCCLibrariesFolder` |
648+
| | | - `ScratchDiskType.FirstCapsuleMediaFolder` |
650649
+-------------------+------------------------+-------------------------------------------------+
651650

652651
#### Returns
@@ -656,9 +655,12 @@ Returns `true` if successful.
656655
#### Example
657656

658657
```js
659-
var scratchPath = Folder.selectDialog('Choose new scratch disk folder');
658+
var scratchPath = Folder.selectDialog("Choose new scratch disk folder");
660659
if (scratchPath && scratchPath.exists) {
661-
app.setScratchDiskPath(scratchPath.fsName, ScratchDiskType.FirstAutoSaveFolder);
660+
app.setScratchDiskPath(
661+
scratchPath.fsName,
662+
ScratchDiskType.FirstAutoSaveFolder
663+
);
662664
}
663665
```
664666

@@ -675,15 +677,15 @@ Writes a string to Premiere Pro's Events panel.
675677
#### Parameters
676678

677679
+-------------+--------+-----------------------+
678-
| Parameter | Type | Description |
680+
| Parameter | Type | Description |
679681
+=============+========+=======================+
680-
| `message` | String | A message to display. |
682+
| `message` | String | A message to display. |
681683
+-------------+--------+-----------------------+
682-
| `decorator` | String | Decorator, one of: |
683-
| | | |
684-
| | | - `info` |
685-
| | | - `warning` |
686-
| | | - `error` |
684+
| `decorator` | String | Decorator, one of: |
685+
| | | |
686+
| | | - `info` |
687+
| | | - `warning` |
688+
| | | - `error` |
687689
+-------------+--------+-----------------------+
688690

689691
#### Returns
@@ -702,7 +704,7 @@ Set workspace as active. Use [app.getWorkspaces()](#appgetworkspaces) to get a l
702704

703705
#### Parameters
704706

705-
| Parameter | Type | Description |
707+
| Parameter | Type | Description |
706708
| ----------- | ------ | -------------------------- |
707709
| `workspace` | String | The name of the workspace. |
708710

@@ -715,11 +717,11 @@ Boolean.
715717
Activate "Editing" workspace.
716718

717719
```js
718-
var workspace = 'Editing';
720+
var workspace = "Editing";
719721
if (app.setWorkspace(workspace)) {
720-
alert('Workspace changed to "' + workspace + '"');
722+
alert('Workspace changed to "' + workspace + '"');
721723
} else {
722-
alert('Could not set "' + workspace + '" workspace');
724+
alert('Could not set "' + workspace + '" workspace');
723725
}
724726
```
725727

@@ -763,10 +765,10 @@ An array of view IDs; can be null.
763765

764766
```js
765767
var allViewIDs = app.getProjectViewIDs();
766-
if (allViewIDs){
767-
var firstOne = allViewIDs[0];
768+
if (allViewIDs) {
769+
var firstOne = allViewIDs[0];
768770
} else {
769-
// No views open.
771+
// No views open.
770772
}
771773
```
772774

@@ -828,9 +830,35 @@ An array of [ProjectItems](../item/projectitem.md); can be null.
828830
829831
```js
830832
var selectedItems = app.getCurrentProjectViewSelection();
831-
if (selectedItems){
832-
var firstOne = selectedItems[0];
833+
if (selectedItems) {
834+
var firstOne = selectedItems[0];
833835
} else {
834-
// No projectItems selected.
836+
// No projectItems selected.
835837
}
836838
```
839+
840+
---
841+
842+
### app.broadcastPrefsChanged()
843+
844+
`app.broadcastPrefsChanged()`
845+
846+
#### Description
847+
848+
Notifies Application that preferences have changed.
849+
850+
#### Parameters
851+
852+
String ID of the preference that changed. (currently only listens to "BE::PreferencesScratchDisksChanged")
853+
854+
#### Returns
855+
856+
Returns `true` if update was successful.
857+
858+
#### Example
859+
860+
```js
861+
app.broadcastPrefsChanged("BE::PreferencesScratchDisksChanged");
862+
```
863+
864+
---

0 commit comments

Comments
 (0)