From f863531998148426fe0d233cda666c23d840c415 Mon Sep 17 00:00:00 2001 From: Kenneth Sinay Date: Mon, 30 Sep 2024 16:36:45 +0800 Subject: [PATCH 1/2] Update characterrange.rst Fix CharacterRange object description typo --- docs/text/characterrange.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/text/characterrange.rst b/docs/text/characterrange.rst index 4251cae..988167b 100644 --- a/docs/text/characterrange.rst +++ b/docs/text/characterrange.rst @@ -15,7 +15,7 @@ The CharacterRange object is an accessor to a character range of the :ref:`TextD Unlike the :ref:`TextDocument`, which looks at only the first character when returning character attributes, here the character range can span zero or more characters. As a consequence, two or more characters *may not have the same attribute value* and this mixed state will be signaled by returning ``undefined``. - The :ref:`characterStart` attribute is the first character index of the range. -- The :ref:`characterEnd` attribue will report the (last + 1) character index of the range, such that (:ref:`characterEnd` - :ref:`characterStart`) represents the number of characters in the range. +- The :ref:`characterEnd` attribute will report the (last + 1) character index of the range, such that (:ref:`characterEnd` - :ref:`characterStart`) represents the number of characters in the range. It is acceptable for most attributes for the effective range to be zero - otherwise known as an insertion point. From 72af50d54349509daf08c179a2d65c6eea2843e6 Mon Sep 17 00:00:00 2001 From: Kenneth Sinay Date: Thu, 3 Oct 2024 22:14:10 +0800 Subject: [PATCH 2/2] Fix typos --- docs/general/application.rst | 1 + docs/general/globals.rst | 2 +- docs/introduction/classhierarchy.rst | 2 +- docs/other/preferences.rst | 4 ++-- docs/other/settings.rst | 4 ++-- docs/text/paragraphrange.rst | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/general/application.rst b/docs/general/application.rst index 7706da8..f18a07c 100644 --- a/docs/general/application.rst +++ b/docs/general/application.rst @@ -60,6 +60,7 @@ Array of ``GpuAccelType`` enums, or null if no viewers are open; read-only. One - ``SOFTWARE`` **Example** + The following sample code checks the current computer's available GPU acceleration types, and sets it to Metal if available. .. code:: javascript diff --git a/docs/general/globals.rst b/docs/general/globals.rst index e8daeeb..bbf7294 100644 --- a/docs/general/globals.rst +++ b/docs/general/globals.rst @@ -4,7 +4,7 @@ Global functions ################ -These globally available functions that are specific to After Effects. Any JavaScript object or function can call these functions, which allow you to display text in a small (3-line) area of the Info panel, to convert numeric time values to and from string values, or to generate a random number. +These globally available functions are specific to After Effects. Any JavaScript object or function can call these functions, which allow you to display text in a small (3-line) area of the Info panel, to convert numeric time values to and from string values, or to generate a random number. ========================== =================================================== diff --git a/docs/introduction/classhierarchy.rst b/docs/introduction/classhierarchy.rst index 53d8e84..dfbe864 100644 --- a/docs/introduction/classhierarchy.rst +++ b/docs/introduction/classhierarchy.rst @@ -3,7 +3,7 @@ After Effects Class Hierarchy ############################# -This section lists the class hierarchies for relevant AE API elements. For a primer on what this means, see :ref:`Javascript.Classes` +This section lists the class hierarchies for relevant AE API elements. For a primer on what this means, see :ref:`Javascript.Classes`. When using this guide, any objects that exist as part of a class hierarchy will note whether they exist as a subclass or base class (or both) of another object. diff --git a/docs/other/preferences.rst b/docs/other/preferences.rst index 7d440a9..7334f74 100644 --- a/docs/other/preferences.rst +++ b/docs/other/preferences.rst @@ -12,9 +12,9 @@ The Preferences object provides an easy way to manage internal AE preferences, s Preferences are identified by section and key within the file, and each key name is associated with a value. -In the preferences file, section names are enclosed in brackets and quotation marks, and key names are listing in quotation marks below the sectionname. All values are strings. +In the preferences file, section names are enclosed in brackets and quotation marks, and key names are listed in quotation marks below the section name. All values are strings. -You can create new preferences with this object, as well as accessing existing preferences. +You can create new preferences with this object, as well as access existing preferences. As of Version 12/CC, preferences and settings methods now take a third argument to specify the target preferences file if Section/Key is not in "Adobe After Effects $versionNumber.x Prefs.txt". diff --git a/docs/other/settings.rst b/docs/other/settings.rst index 4d61211..6bd77db 100644 --- a/docs/other/settings.rst +++ b/docs/other/settings.rst @@ -12,9 +12,9 @@ The Settings object provides an easy way to manage settings for third-party scri Settings are identified by section and key within the file, and each key name is associated with a value. -In the settings file, section names are enclosed in brackets and quotation marks, and key names are listing in quotation marks below the sectionname. All values are strings. +In the settings file, section names are enclosed in brackets and quotation marks, and key names are listed in quotation marks below the section name. All values are strings. -You can create new settings with this object, as well as accessing existing settings. +You can create new settings with this object, as well as access existing settings. As of Version 12/CC, preferences and settings methods now take a third argument to specify the target preferences file if Section/Key is not in the main preferences file. See :ref:`Preferences` for more info. diff --git a/docs/text/paragraphrange.rst b/docs/text/paragraphrange.rst index fce3ce1..2d9abc2 100644 --- a/docs/text/paragraphrange.rst +++ b/docs/text/paragraphrange.rst @@ -14,7 +14,7 @@ The ParagraphRange object is an accessor to a paragraph range of the :ref:`TextD - The :ref:`characterStart` attribute will report the first character index of the range. - The :ref:`characterEnd` attribute will report the (last + 1) character index of the range, such that (:ref:`characterEnd` - :ref:`characterStart`) represents the number of characters in the range. -- The only time these two properties will equal will on an empty last paragraph of the :ref:`TextDocument`. +- The only time these two properties will equal is on an empty last paragraph of the :ref:`TextDocument`. When accessed, the ParagraphRange object will check that effective :ref:`characterStart` and effective :ref:`characterEnd` of the range remains valid for the current span of the related :ref:`TextDocument`. This is the same rule as applied when the ParagraphRange was created, but because the length of the related :ref:`TextDocument` can change through the addition or removal of characters, the effective :ref:`characterStart` and effective :ref:`characterEnd` may no longer be valid. In this situation an exception will be thrown on access, either read or write. The :ref:`isRangeValid` attribute will return false if the effective range is no longer valid.