API Reference
Inbuilt Functions
Various inbuilt functions, including timers.
CancelTimer() | Cancels a timer. |
FileOrDirectoryExists() | Checks whether the file or directory exists on disk. |
GetDirectoryFileList() | Gets the list of files within a given directory based on an optional search filter. |
GetFileModifiedDate() | Returns the modified time of a file. |
GetGPUName() | Returns the name of the GPU currently being used by Notch's render engine. |
GetViewportSize() | Returns the size of the render viewport as an array of two numbers: width, height. |
JumpGlobalTime() | Jump the timeline to time specified in seconds. |
Log() | Writes a message to Notch's log window. |
SetPausePlayback() | Pauses and unpauses the playhead when running in Standalone. |
Timer() | Creates a timer that calls a function at the interval specified. |
Document Object
Manipulate layers and exposed parameters.
FindLayer() | Finds the layer object with the given name. |
FindResourceByName() | Finds a Notch resource by name. |
GetExposedPropertyValue() | Returns the float value of an exposed property. |
GetLayer() | Retrieves the layer object with the given index. |
GetNumLayers() | Returns the number of layers in the project. |
SetExposedPropertyValue() | Sets the value of an exposed property. |
Layer Object
Get the various elements of a layer, including getting nodes.
CreateNode() | Creates a node within a layer. |
FindNode() | Finds the node object with the given name within a layer. |
GetEndTime() | Provides the end time of the layer (as per Notch timeline) in hundredths of a second. |
GetName() | Returns the name of the layer. |
GetNode() | Retrieves the node object with the given index within a layer. |
GetNodes() | Retrieves a list of node objects within a layer. |
GetNumNodes() | Returns the number of nodes in the layer. |
GetStartTime() | Provides the start time of the layer (as per Notch timeline) in hundredths of a second. |
GetVisible() | Retrieves the visible state of the layer. |
SetVisible() | Sets whether the layer is visible. |
Node Object
Read and manipulate a node in a layer.
AddChild() | Adds a node as a child of another node. |
AddInput() | Creates an input connection between a node and a property. |
AsRSSFeedNode() | Returns the node as a RSSFeedNode object, if this is the correct node type. |
DeleteNode() | Deletes the node. |
GetChild() | Retrieves the child node object with the given index. |
GetEndTime() | Provides the end time of the node (as per Notch timeline) in hundredths of a second. |
GetEnvelopeValue() | Retrieves the calculated value (post modifiers and keyframes) of a float property in a node. |
GetFloat() | Retrieves the value of a float property in a node. |
GetName() | Returns the name of the node. |
GetNodeGraphPosition() | Retrieves the location (X and Y position) of a node within the nodegraph. |
GetNumChildren() | Returns the number of child nodes. |
GetNumParents() | Returns the number of parent nodes. |
GetParent() | Retrieves the parent node object with the given index. |
GetStartTime() | Provides the start time of the node (as per Notch timeline) in hundredths of a second. |
GetString() | Retrieves the value of a string property within a node. |
GetTransformArrayColour() | Gets the colour of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
GetTransformArrayPRS() | Gets the position, rotation and scale of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
GetTransformArrayUVScaleOffset() | Gets the UV scale and offset of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
GetVisible() | Retrieves the visible state of the node. |
RemoveChild() | Removes a child node from a node. |
RemoveInput() | Deletes an input connection between a node and a property. |
SetEnvelopeValue() | Sets the value of a float property in a node but only for run/calculation time. |
SetFloat() | Sets the value of a float property in a node. |
SetInt() | Sets the value of an integer property in a node. |
SetName() | Sets the name of the node. |
SetNodeGraphPosition() | Sets the position of a node in the nodegraph. |
SetPropertyArtnet16Bit() | Sets the ArtNet property for a node's parameter to be 16-bit. |
SetPropertyArtnetDisabled() | Disables ArtNet for a node's parameter. |
SetPropertyArtnetLocation() | Sets the ArtNet property location for a node's parameter. |
SetString() | Sets the value of a string property in a node. |
SetTransformArrayColour() | Sets the colour of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
SetTransformArrayPRS() | Sets the position, rotation and scale of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
SetTransformArrayUVScaleOffset() | Sets the UV scale and offset of an element from an [Exposable Array](nodes-interactive-array-sources-exposable-array) node. |
SetVisible() | Sets whether the node is visible. |
RSS Feed Node
Read data from the RSS node.
GetEntryImageFilename() | Retrieves the file path of the image for a given RSS entry from an RSS Node. |
GetEntryTitle() | Retrieves the title of a given RSS entry from an RSS Node. |
GetNumEntries() | Retrieves the current number of entries retrieved in a RSS Node. |
Update Context
Read and write to the running context, including manipulating the timeline.
GlobalTime | Gets or sets the time on the Notch timeline in seconds. |
Layer | Provides the current layer object. |
LocalTime | Provides the time local to the current layer. |
Node | Provides the current JavaScript node object running the script. |
TimeDelta | Provides the time between the last frame and the current one in seconds. |
HTTP
Make HTTP/HTTPS requests to retrieve data / files / images.
HTTPGet | Calls a URL and returns the payload of the HTTP response as a string. |
HTTPGetFile | Calls a URL and then saves the payload of the HTTP response to a file. |
NFetch | Function to make asynchronous HTTP requests and then invoke a callback function with the result. |
Resource Object
Reload resources and handle CSV files.
GetCSVEntry() | Gets a single CSV entry at the corresponding row and column position, if the resource object is a valid CSV File resource. |
GetCSVFileContents() | Gets the contents of a CSV as a 1-dimensional array, if the resource object is a CSV File resource. |
GetCSVFileContents2D() | Gets the contents of a CSV as a 2-dimensional array, if the resource object is a CSV File resource. |
ReloadResource() | Reloads a Notch resource. |