Skip to content

Commit

Permalink
add some examples, fix few return values
Browse files Browse the repository at this point in the history
  • Loading branch information
rendertom committed Aug 18, 2020
1 parent c934c9b commit cd0a079
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 10 deletions.
55 changes: 49 additions & 6 deletions 2 - App object/application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ The number of the build of Premiere Pro being run.

**Type**

Integer; read-only.
String; read-only.

**Example**

Get a build version of current application *(Adobe Premiere Pro version 14.3.1 (Build 45))*

.. code:: javascript
parseInt(app.build); // 45
----

Expand Down Expand Up @@ -84,6 +92,14 @@ The path containing the currently active "Adobe Premiere Pro Prefs" file.

String; read-only.

**Example**

Get a path to a currently active preference file

.. code:: javascript
app.getPProPrefPath; // /Users/USERNAME/Documents/Adobe/Premiere Pro/14.0/Profile-USERNAME/
----

.. _app.getPProSystemPrefPath:
Expand All @@ -101,6 +117,14 @@ Premiere Pro's active configuration files, not specific to a given user.

String; read-only.

**Example**

Get a path to a currently active configuration folder

.. code:: javascript
app.getPProSystemPrefPath; // /Library/Application Support/Adobe/Adobe Premiere Pro 2020/
----

.. _app.project:
Expand Down Expand Up @@ -201,7 +225,7 @@ A unique identifier for the currently logged-in Creative Cloud user.

**Type**

userGuid object; read-only.
String; read-only.

----

Expand All @@ -218,7 +242,15 @@ The version of Premiere Pro, providing the API.

**Type**

Floating point; read-only.
String; read-only.

**Example**

Get a version of a current application *(Adobe Premiere Pro version 14.3.1 (Build 45))*

.. code:: javascript
app.version; // 14.3.1
----

Expand Down Expand Up @@ -302,12 +334,23 @@ Determines whether the file at path can be opened as a Premiere Pro :ref:`projec

**Parameters**

None.
A path as a ``String`` to a file to test.

**Returns**

Returns **true** if file can be opened as a Premiere Pro :ref:`project <project>`.

**Example**

Test for valid project files

.. code:: javascript
app.isDocument('~/Desktop/myProject.prproj'); // true
app.isDocument('~/Desktop/textFile.txt'); // false
app.isDocument('~/Desktop/footageFile.mov'); // false
app.isDocument('~/Desktop/imageFile.mov'); // false
----

.. _app.isDocumentOpen:
Expand Down Expand Up @@ -357,7 +400,7 @@ Returns **true** if successful.
.. _app.openDocument:

app.openDocument()
******************************************************************************************************************************************************
***********************

``app.openDocument(path)``

Expand Down Expand Up @@ -564,4 +607,4 @@ None.

**Returns**

Returns **true** if trace was added.
Returns **true** if trace was added.
14 changes: 11 additions & 3 deletions 3 - Project object/project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Project.documentID

**Description**

A read-only unique identifier for this project.
A unique identifier for this project, in format of ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``.

**Type**

GUID; read-only.
String; read-only.

----

Expand Down Expand Up @@ -83,6 +83,14 @@ The file path of the project.

String; read-only.

**Example**

Get a path of a curently active project

.. code:: javascript
app.project.path; // /Users/USERNAME/Desktop/Project.prproj
----

.. _project.rootItem:
Expand Down Expand Up @@ -690,7 +698,7 @@ Makes the :ref:`sequence` with the provided sequence ID, active. This will open

**Parameters**

A valid ``sequenceID``.
A valid :ref:`sequence.id`.

**Returns**

Expand Down
4 changes: 3 additions & 1 deletion 4 - ProjectItem object/projectItem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ None.

**Returns**

``Number``, one of

+------------+---------------------+
| labelColor | - 0 = Violet |
| | - 1 = Iris |
Expand Down Expand Up @@ -832,7 +834,7 @@ Sets the project item's color label.

**Parameters**

New label color; see projectItem.getColorLabel_.
New label color; see :ref:`projectItem.getColorLabel`.

**Returns**

Expand Down

0 comments on commit cd0a079

Please sign in to comment.