If Object
Represents a If within the Composition.
If Properties
The parent object of this item.
A PropertyList object that allows access to all of the Custom Properties contained in this object.
A SystemPropertyList object that allows access to all of the System Properties contained in this object.
The string “If”.
An array of objects representing the children of this object, if any. Null if the object has no children.
Returns the position (zero-based index) of this item’s parent’s array of children.
Returns the next item after this one in this item’s parent’s array of children, or null of this is the last item. In other words, returns the next sibling in the object hierarchy. Equivalent to:
Returns the previous item before this one in this item’s parent’s array of children, or null of this is the first item. In other words, returns the next sibling in the object hierarchy. . Equivalent to:
If this item is repeating due to a “for-each” repeat, this property contains the for-each value associated with this instance of the object. This will be a value in the array used for the for-each. If this item is not repeating due to a “for-each” repeat, this property will be null.
An integer value that represents the “repeat index” of this item if it repeats, according to the context in which the current script is executing. The first repeat starts at index zero. The value is -1 if the current item does not repeat or has a repeat count of one (in other words, it is -1 if it doesn’t actually repeat).
An integer value that represents the “play ordinal number” of this item. Starting with the number 0, each play is assigned a unique number. The numbers are contiguous (no gaps). Play number sequences are maintained within the item’s parent only. For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0. An item will only have a non-zero play number if it repeats. The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.
If this item repeats in parallel with the “Renew parallel repeats” option enabled, this is an integer value that is the “playNumber” value of the original parallel repeat for this item if it has been renewed because a prior parallel repeat ended. If this is the original parallel repeat, the value of
For example, if parallel repeat number 5 of the item ends, but the Renew parallel repeats checkbox is enabled, the ending repeat will be replaced with a new, replacement repeat. The new repeat will have new repeatIndex and playNumber values (according to how many other repeats have already occurred). However, the playNumberBeforeRenewal value will still be 5 in this example. This property is always 0 for Composition, Checkpoint, Delay, and Target.
A constant that can be passed in calls to the “setRepeat” method. (See the description of the “setRepeat” method.)
A constant that can be passed in calls to the “setRepeat” method. (See the description of the “setRepeat” method.)
A constant that can be passed in calls to the “setRepeat” method. (See the description of the “setRepeat” method.)
A constant that can be passed in calls to the “setRepeat” method. (See the description of the “setRepeat” method.) |
|
If Methods | |
getChild Method
Returns a specific child object by name, or null if there is no child with the specified name. |
object getChild(string childName) |
getItemViaPath Method
Given a path to an item in the Composition object hierarchy, returns the object in the hierarchy that represents that item. The “pathType” parameter value specifies the “starting point” of the path, relative to this If. For Ifs it can be any of the following values (case is not significant):
The path is relative to the Composition as a whole. (Therefore, the path must start with the name of a Band.)
The path is relative to this If’s parent Band.
The path is relative this If’s parent Track.
The path is relative to this If’s parent Clip.
The path is relative to the Chain that contains this item. If nested within multiple Chains, the path is relative to the lowest-level containing Chain (the Chain “nearest to” the item in terms of the parentage hierarchy).
The path is relative to the Transaction that contains this item. If nested within multiple Transactions, the path is relative to the lowest-level containing Transaction (the Transaction “nearest to” the item in terms of the parentage hierarchy).
The path is relative to the If that contains this item. If nested within multiple Transactions, the path is relative to the lowest-level containing If (the If “nearest to” the item in terms of the parentage hierarchy).
The path is relative to the Switch that contains this item. If nested within multiple Switches, the path is relative to the lowest-level containing Switch (the Switch “nearest to” the item in terms of the parentage hierarchy). The “propertyPath” parameter contains a property path as specified for “In Situ Substitution Specifications”. |
object getItemViaPath(string pathType, string path) |
clearRepeat Method
Removes any current repeating specification from this item (so that it will play exactly once). |
void clearRepeat() |
setRepeat Method
Sets a new repeating specification for this item. The “timingType” parameter indicates which type of repeat timing is to be used. It must be one of the following values:
The “repeatType” parameter indicates what sort of value is contained in the “control” parameter. Currently the “repeatType” parameter must always be set to “REPEAT_TYPE_COUNT_CONSTANT”. The “control” parameter is the count of the number of repeats to be performed. If the value is less than or equal to zero, the item will not be played at all. The “distributionType” parameter indicates what sort of value is contained in the “distribution” parameter. Currently the “distributionType” parameter must always be set to “REPEAT_DISTRIBUTION_CONSTANT”. The “distribution” parameter is a time length, in milliseconds, by which the start of each repeat is to be offset from the start of the prior repeat. This value only applies to parallel repeats, and must be set to zero for serial repeats. |
void setRepeat(int timingType, intRepeat Type, long control, int distributionType, long distribution) |
end Method
Requests that play of this If be terminated. If an optional error text string is provided, the If will be considered to have ended in error. If the If is not currently playing, no action is taken. Note that this is not an “abort” – play will be ended after any currently playing item in the If completes. |
void end(String optionalErrorText) |
endRepeat Method
Requests that repeating for this If be ended. If this If is not currently playing, no action is taken. Note that this is not an “abort” – repeating will be ended after any currently playing individual repeat of the If completes. This method is permitted for serial repeating only, it is not supported for parallel repeating and an error will be generated if it is attempted to call this method for a parallel repeat. |
void endRepeat() |