Composition, layer, and property functions (PB only)value (layer, property) When used on the right side of an equation, obtains the value of the specified property in the specified layer. When used on the left side, creates a keyframe for the specified property. velocity (layer, property) When used on the right side of an equation, obtains the velocity of the specified property in the specified layer. When used on the left side, creates a keyframe for the specified property. effect_value (layer, effect index, property index) When used on the right side of an equation, obtains the value of the effect property in the specified layer, indicated by the effect index and the property index, using the order of effects in the Effect Controls window (see Specifying layers and properties (PB only)). When used on the left side, creates a keyframe for the specified effect property. comp_audio_amplitude ( ) Obtains and normalizes the combined amplitude of all audio layers in the composition at the current time, and returns a value between 0.0 and 1.0. layer_audio_amplitude (layer) Obtains and normalizes the amplitude of the audio layer at the current time, and returns a value between 0.0 and 1.0. layer_size (layer) Obtains the original size of the layer in pixels as a vector with two dimensions {width, height}. Any scaling of the layer is ignored. layer_time_bounds (layer) Obtains the in and out times for the layer in seconds as a vector with two dimensions {in time, out time}. time ( ) Obtains the current time in seconds the script has reached. tmap (t, statement) Evaluates statement at time t (in seconds) rather than at the current time. frame_num ( ) Obtains the frame number of the composition at the point the script is currently sampling. sample_num ( ) Obtains the current sample number that the script is currently running. frame_to_time (f) Converts the frame number f to a time in seconds. layer_to_comp (layer, v) Transforms the position vector v from layer coordinates in the layer to composition coordinates. Use this function to transform the layer coordinates of anchor points and effect point controls to composition coordinates. comp_to_layer (layer, v) Transforms the position vector v from composition coordinates to coordinates in the layer coordinate system for the layer. Use this function to transform effect point control positions or anchor points from composition coordinates to layer coordinates. |