// All class methods imply a handle parameter in the JSON params object (see examples). namespace Pixera { // Ui namespace is only accessible from plugins hosted in Pixera, i.e. it is // not relevant to external API access. namespace Ui { handle getComboBoxWithId(double id); => {"jsonrpc":"2.0", "id":1, "method":"Pixera.Ui.getComboBoxWithId", "params":{"id":1.0}} <= {"jsonrpc":"2.0", "id":1, "result":123456789} class ComboBox { null clear(); => {"jsonrpc":"2.0", "id":2, "method":"Pixera.Ui.ComboBox.clear", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":2} null addItem(string item,int id); => {"jsonrpc":"2.0", "id":3, "method":"Pixera.Ui.ComboBox.addItem", "params":{"handle":123456789, "item":"Abcd", "id":1}} <= {"jsonrpc":"2.0", "id":3} null setSelectedId(int id); => {"jsonrpc":"2.0", "id":4, "method":"Pixera.Ui.ComboBox.setSelectedId", "params":{"handle":123456789, "id":1}} <= {"jsonrpc":"2.0", "id":4} int getSelectedId(); => {"jsonrpc":"2.0", "id":5, "method":"Pixera.Ui.ComboBox.getSelectedId", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":5, "result":1} } } namespace Utility { // Outputs a debug string into the Pixera log and returns the same string in // the reply. string outputDebug(string message); => {"jsonrpc":"2.0", "id":6, "method":"Pixera.Utility.outputDebug", "params":{"message":"Abcd"}} <= {"jsonrpc":"2.0", "id":6, "result":"Abcd"} int getApiRevision(); => {"jsonrpc":"2.0", "id":7, "method":"Pixera.Utility.getApiRevision"} <= {"jsonrpc":"2.0", "id":7, "result":1} // Experimental. Currently only relevant to Javascript interpretation within Pixera. null requestCallback(string functionName); => {"jsonrpc":"2.0", "id":8, "method":"Pixera.Utility.requestCallback", "params":{"functionName":"Abcd"}} <= {"jsonrpc":"2.0", "id":8} } namespace Screens { // Screen name as shown in the inspector. handle getScreenWithName(string name); => {"jsonrpc":"2.0", "id":9, "method":"Pixera.Screens.getScreenWithName", "params":{"name":"Abcd"}} <= {"jsonrpc":"2.0", "id":9, "result":123456789} // This function was introduced for test purposes, is not typical of the API // and is likely to be removed soon. Do not use it in shipping products! // The function sets the position of the screen with the given name. // The recommended way of doing this is to first use getScreenWithName(.) and // then Screen.setPosition(.). null setNamedScreenPosition(string name,double xPos,double yPos,double zPos); => {"jsonrpc":"2.0", "id":10, "method":"Pixera.Screens.setNamedScreenPosition", "params":{"name":"Abcd", "xPos":1.0, "yPos":1.0, "zPos":1.0}} <= {"jsonrpc":"2.0", "id":10} // Returns handles to all screens currently used in the Screens tab. handle[] getScreens(); => {"jsonrpc":"2.0", "id":11, "method":"Pixera.Screens.getScreens"} <= {"jsonrpc":"2.0", "id":11, "result":[123456789, ...]} class Screen { // The position units are as in the inspector, i.e. meters. boolean setPosition(double xPos,double yPos,double zPos); => {"jsonrpc":"2.0", "id":12, "method":"Pixera.Screens.Screen.setPosition", "params":{"handle":123456789, "xPos":1.0, "yPos":1.0, "zPos":1.0}} <= {"jsonrpc":"2.0", "id":12, "result":true} string getName(); => {"jsonrpc":"2.0", "id":13, "method":"Pixera.Screens.Screen.getName", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":13, "result":"Abcd"} } } namespace Resources { // Returns handles to all resources (including within subfolders) in the resource // tree in the Compositing tab. handle[] getResources(); => {"jsonrpc":"2.0", "id":14, "method":"Pixera.Resources.getResources"} <= {"jsonrpc":"2.0", "id":14, "result":[123456789, ...]} // Returns a handle to a folder in the resource tree. The namePath // specifies the folder by starting from the root and then listing // all the names as seen in the resources tree separated by forward // slashes, e.g. "Media/Std Backgrounds/Atmospherics". handle getResourceFolderWithNamePath(string namePath); => {"jsonrpc":"2.0", "id":15, "method":"Pixera.Resources.getResourceFolderWithNamePath", "params":{"namePath":"Abcd"}} <= {"jsonrpc":"2.0", "id":15, "result":123456789} class ResourceFolder { // Returns handles to all the resources that are directly in one folder (i.e. does not consider subfolders). handle[] getResources(); => {"jsonrpc":"2.0", "id":16, "method":"Pixera.Resources.ResourceFolder.getResources", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":16, "result":[123456789, ...]} } class Resource { string getName(); => {"jsonrpc":"2.0", "id":17, "method":"Pixera.Resources.Resource.getName", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":17, "result":"Abcd"} // Returns an id based on the handle. This is currently necessary in some situations // because some API implementations can not yet consume handles as parameters. double getId(); => {"jsonrpc":"2.0", "id":18, "method":"Pixera.Resources.Resource.getId", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":18, "result":1.0} // Returns the png thumbnail data of the resource in a base 64 string. This is the // image that is shown in the resource tree. Its resolution is currently 256 * 174 // pixels. string getThumbnailAsBase64(); => {"jsonrpc":"2.0", "id":19, "method":"Pixera.Resources.Resource.getThumbnailAsBase64", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":19, "result":"Abcd"} } } namespace Timelines { // Returns the handle of the timeline at the (zero-based) index in // the Timelines listing of the Compositing tab. handle getTimelineAtIndex(int index); => {"jsonrpc":"2.0", "id":20, "method":"Pixera.Timelines.getTimelineAtIndex", "params":{"index":1}} <= {"jsonrpc":"2.0", "id":20, "result":123456789} // Returns the handle of the timeline with the given name (as shown in the // timeline list). handle getTimelineFromName(string name); => {"jsonrpc":"2.0", "id":21, "method":"Pixera.Timelines.getTimelineFromName", "params":{"name":"Abcd"}} <= {"jsonrpc":"2.0", "id":21, "result":123456789} // Returns handles to all timelines. handle[] getTimelines(); => {"jsonrpc":"2.0", "id":22, "method":"Pixera.Timelines.getTimelines"} <= {"jsonrpc":"2.0", "id":22, "result":[123456789, ...]} class Timeline { // Sets the current position of the timeline. The unit is frames. Use getFps(.) to // relate the frames to seconds. // This method will likely be changed in future versions of the API (but the original // maintained for backwards compatibility) to make it consistent with getCurrentTime(.). boolean setCurrentFrame(int time); => {"jsonrpc":"2.0", "id":23, "method":"Pixera.Timelines.Timeline.setCurrentFrame", "params":{"handle":123456789, "time":1}} <= {"jsonrpc":"2.0", "id":23, "result":true} // Gets the current position of the timeline in frames. Use getFps(.) to relate // the frames to seconds. double getCurrentTime(); => {"jsonrpc":"2.0", "id":24, "method":"Pixera.Timelines.Timeline.getCurrentTime", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":24, "result":1.0} // Sets the transport mode. // 1: Play // 2: Pause // 3: Stop boolean setTransportMode(int mode); => {"jsonrpc":"2.0", "id":25, "method":"Pixera.Timelines.Timeline.setTransportMode", "params":{"handle":123456789, "mode":1}} <= {"jsonrpc":"2.0", "id":25, "result":true} // Returns the frames per second value used as a time base. double getFps(); => {"jsonrpc":"2.0", "id":26, "method":"Pixera.Timelines.Timeline.getFps", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":26, "result":1.0} // Returns the name of the timeline with the given handle. string getName(); => {"jsonrpc":"2.0", "id":27, "method":"Pixera.Timelines.Timeline.getName", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":27, "result":"Abcd"} null store(); => {"jsonrpc":"2.0", "id":28, "method":"Pixera.Timelines.Timeline.store", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":28} // Returns a handle to the layer in the timeline at the (zero-based) index in // the order as shown in the Pixera Timeline interface. handle getLayerAtIndex(int index); => {"jsonrpc":"2.0", "id":29, "method":"Pixera.Timelines.Timeline.getLayerAtIndex", "params":{"handle":123456789, "index":1}} <= {"jsonrpc":"2.0", "id":29, "result":123456789} // Creates a layer and returns a handle to it. handle createLayer(); => {"jsonrpc":"2.0", "id":30, "method":"Pixera.Timelines.Timeline.createLayer", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":30, "result":123456789} // Returns the handles of all cues in chronological order. handle[] getCues(); => {"jsonrpc":"2.0", "id":31, "method":"Pixera.Timelines.Timeline.getCues", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":31, "result":[123456789, ...]} // Returns the handle of the cue with the given Index. // Order of indices is in chronological order. handle getCueAtIndex(int index); => {"jsonrpc":"2.0", "id":32, "method":"Pixera.Timelines.Timeline.getCueAtIndex", "params":{"handle":123456789, "index":1}} <= {"jsonrpc":"2.0", "id":32, "result":123456789} // Returns the handle of the cue with the given name. // If multiple cues have the same name, the handle to the first match will be returned. handle getCueFromName(string name); => {"jsonrpc":"2.0", "id":33, "method":"Pixera.Timelines.Timeline.getCueFromName", "params":{"handle":123456789, "name":"Abcd"}} <= {"jsonrpc":"2.0", "id":33, "result":123456789} // Creates a cue on the timeline with the given handle and returns its handle. handle createCue(string name,double time,int operation); => {"jsonrpc":"2.0", "id":34, "method":"Pixera.Timelines.Timeline.createCue", "params":{"handle":123456789, "name":"Abcd", "time":1.0, "operation":1}} <= {"jsonrpc":"2.0", "id":34, "result":123456789} } class Layer { // Returns a node immediately below the layer based on the name displayed in the // Timeline UI (e.g. the "Position" node below a standard layer). handle getNodeWithName(string name); => {"jsonrpc":"2.0", "id":35, "method":"Pixera.Timelines.Layer.getNodeWithName", "params":{"handle":123456789, "name":"Abcd"}} <= {"jsonrpc":"2.0", "id":35, "result":123456789} // Assigns a resource to the layer. The id is conceptually the handle but the // handle can not be passed directly for some implementations of the API. Therefore, // Resource.getId() should be used to fill this parameter. null assignResource(double id); => {"jsonrpc":"2.0", "id":36, "method":"Pixera.Timelines.Layer.assignResource", "params":{"handle":123456789, "id":1.0}} <= {"jsonrpc":"2.0", "id":36} // Creates a clip and returns a handle to it. handle createClip(); => {"jsonrpc":"2.0", "id":37, "method":"Pixera.Timelines.Layer.createClip", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":37, "result":123456789} // Creates a clip at the given time and returns a handle to it. handle createClipAtTime(double time); => {"jsonrpc":"2.0", "id":38, "method":"Pixera.Timelines.Layer.createClipAtTime", "params":{"handle":123456789, "time":1.0}} <= {"jsonrpc":"2.0", "id":38, "result":123456789} } class Clip { // Returns an id based on the handle. This is currently necessary in some situations // because some API implementations can not yet consume handles as parameters. double getId(); => {"jsonrpc":"2.0", "id":39, "method":"Pixera.Timelines.Clip.getId", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":39, "result":1.0} // Returns a handle to the timeline in which the clip is situated. handle getTimeline(); => {"jsonrpc":"2.0", "id":40, "method":"Pixera.Timelines.Clip.getTimeline", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":40, "result":123456789} double getTime(); => {"jsonrpc":"2.0", "id":41, "method":"Pixera.Timelines.Clip.getTime", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":41, "result":1.0} double getDuration(); => {"jsonrpc":"2.0", "id":42, "method":"Pixera.Timelines.Clip.getDuration", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":42, "result":1.0} // Assigns a resource to the resource parameter within the clip. // Conceptually, the resId is a handle but the handle can not be passed directly for // some implementations of the API. Therefore, Resource.getId() should be used to // fill this parameter. null assignResource(double resId); => {"jsonrpc":"2.0", "id":43, "method":"Pixera.Timelines.Clip.assignResource", "params":{"handle":123456789, "resId":1.0}} <= {"jsonrpc":"2.0", "id":43} // Creates a key at the given time with the given value in the clip parameter specified by // namePath, with the parts of namePath consisting of the strings shown in the timeline UI. // E.g. "Position/x" refers to the parameter responsible for the x position of the layer. // The name of this method may be changed in future versions of the API to reflect the // "key" (instead of "event") terminology. null createEvent(string namePath,double time,double value); => {"jsonrpc":"2.0", "id":44, "method":"Pixera.Timelines.Clip.createEvent", "params":{"handle":123456789, "namePath":"Abcd", "time":1.0, "value":1.0}} <= {"jsonrpc":"2.0", "id":44} } // Returns a handle for the node specified by id after checking that a node with the id exists. // Conceptually, the id and the handle are the same but some implementations of the API can not // yet consume handles as parameters, making it necessary to translate between the two occasionally. handle getNodeFromId(double id); => {"jsonrpc":"2.0", "id":45, "method":"Pixera.Timelines.getNodeFromId", "params":{"id":1.0}} <= {"jsonrpc":"2.0", "id":45, "result":123456789} class Node { // Returns a handle to a parameter node child with the given name. E.g. if the current // node is the "Position" folder then the name "x" would return the parameter node // representing the x position of the layer. handle getParamWithName(string name); => {"jsonrpc":"2.0", "id":46, "method":"Pixera.Timelines.Node.getParamWithName", "params":{"handle":123456789, "name":"Abcd"}} <= {"jsonrpc":"2.0", "id":46, "result":123456789} // Sets the values of the children of the node in the order that they are displayed // in the timeline. This allows e.g. setting the x, y, and z values of a node with // one invocation. null setValues(double[] values); => {"jsonrpc":"2.0", "id":47, "method":"Pixera.Timelines.Node.setValues", "params":{"handle":123456789, "values":[1.0, ...]}} <= {"jsonrpc":"2.0", "id":47} // Returns a handle to the timeline that holds the node. handle getTimeline(); => {"jsonrpc":"2.0", "id":48, "method":"Pixera.Timelines.Node.getTimeline", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":48, "result":123456789} } class Param { null setValue(double value); => {"jsonrpc":"2.0", "id":49, "method":"Pixera.Timelines.Param.setValue", "params":{"handle":123456789, "value":1.0}} <= {"jsonrpc":"2.0", "id":49} } class Cue { // Returns the name of the Cue with the give handle. string getName(); => {"jsonrpc":"2.0", "id":50, "method":"Pixera.Timelines.Cue.getName", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":50, "result":"Abcd"} // Sets Name of Cue with given handle. boolean setName(string name); => {"jsonrpc":"2.0", "id":51, "method":"Pixera.Timelines.Cue.setName", "params":{"handle":123456789, "name":"Abcd"}} <= {"jsonrpc":"2.0", "id":51, "result":true} // Returns operation mode of cue with given handle. // 0: None // 1: Play // 2: Pause // 3: Stop // 4: Jump int getOperation(); => {"jsonrpc":"2.0", "id":52, "method":"Pixera.Timelines.Cue.getOperation", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":52, "result":1} // Sets operation mode for cue with given handle: // 0: None // 1: Play // 2: Pause // 3: Stop // 4: Jump boolean setOperation(int operation); => {"jsonrpc":"2.0", "id":53, "method":"Pixera.Timelines.Cue.setOperation", "params":{"handle":123456789, "operation":1}} <= {"jsonrpc":"2.0", "id":53, "result":true} // Returns jump mode of cue with given handle. // 0: None // 1: To time // 2: To cue int getJumpMode(); => {"jsonrpc":"2.0", "id":54, "method":"Pixera.Timelines.Cue.getJumpMode", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":54, "result":1} // Sets jump mode of cue with given handle, this does only affect the cue // if it has its operation set to jump. // 0: None // 1: To time // 2: To cue boolean setJumpMode(int jumpMode); => {"jsonrpc":"2.0", "id":55, "method":"Pixera.Timelines.Cue.setJumpMode", "params":{"handle":123456789, "jumpMode":1}} <= {"jsonrpc":"2.0", "id":55, "result":true} // Returns the time in frames of the jump goal of the cue with the given handle. double getJumpGoalTime(); => {"jsonrpc":"2.0", "id":56, "method":"Pixera.Timelines.Cue.getJumpGoalTime", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":56, "result":1.0} // Sets the time where the timline should jump to if the cue with the given handle is reached. // This only affects the cue if it's set to jumpToTime. boolean setJumpGoalTime(double time); => {"jsonrpc":"2.0", "id":57, "method":"Pixera.Timelines.Cue.setJumpGoalTime", "params":{"handle":123456789, "time":1.0}} <= {"jsonrpc":"2.0", "id":57, "result":true} // Returns the name of the cue the time line should jump to if the cue with the given handle is reached. string getJumpGoalLabel(); => {"jsonrpc":"2.0", "id":58, "method":"Pixera.Timelines.Cue.getJumpGoalLabel", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":58, "result":"Abcd"} // Returns the handle of the cue the time line should jump to if the cue with the given handle is reached. handle getJumpGoalCue(); => {"jsonrpc":"2.0", "id":59, "method":"Pixera.Timelines.Cue.getJumpGoalCue", "params":{"handle":123456789}} <= {"jsonrpc":"2.0", "id":59, "result":123456789} // Sets the name of the cue to wich the timeline should jump if the cue with the given handle is reached. // This only affects the cue if it's set to jumpToLabel. boolean setJumpGoalLabel(string jumpGoalLabel); => {"jsonrpc":"2.0", "id":60, "method":"Pixera.Timelines.Cue.setJumpGoalLabel", "params":{"handle":123456789, "jumpGoalLabel":"Abcd"}} <= {"jsonrpc":"2.0", "id":60, "result":true} } } }