Avid Motion Graphics™ Application Programming Interface (API) Guide Version 2.5 Date Revised Changes Made 04 February 2013 Added version and changes date. 28 November 2012 Reviewed original preliminary document, and updated and removed unnecessary sections. Persons to Contact Regarding this Document William Hadsell, Principle Product Manager William.Hadsell@avid.com Danielle Prigmore, Third-Party Program Manager 75 Network Drive, Burlington, Massachusetts 01803 (978) 640-3210 Danielle.
Legal Notices Copyright and Disclaimer Product specifications are subject to change without notice and do not represent a commitment on the part of Avid Technology, Inc. The software described in this document is furnished under a license agreement. You can obtain a copy of that license by visiting Avid's Web site at www.avid.com. The terms of that license are also available in the product in the same directory as the software.
Contents Persons to Contact Regarding this Document ........................................................................................................... 1 Legal Notices ............................................................................................................................................................. 2 Copyright and Disclaimer ...................................................................................................................................... 2 Overview .....
Overview The Avid Motion Graphics Application Programming Interface (API) is comprised of very few routines due to the Avid Motion Graphics list and editors design. In theory, only two commands (itemset() and itemget()) should be needed to set or retrieve any parameter of the program. But in practice, a few more are implemented for your convenience.
itemget value = itemget(itemName, editorName) Gets the value of an editor for itemName itemgo itemgo(itemName, editorName, value, transition, delay) Performs like an itemset() but with an extra delay and transition parameters. The delay value postpones the execution of the command the given time in seconds The transition time means to apply the value by smootly interpolating from the previous value to the new value in transition seconds. Note that interpolating values does not make sense for all editors.
specifies the shape of the transition. The time interval in the curve1D is irrelevant because its whole time interval [tmin, tmax] is accessed in any case for the transition time. itemnew newItem = itemnew(listName, itemName, editorName, value, editorName, value, ...
itemgetChildren childrenItem = itemgetChildren(listName, itemName) Returns the list of children of itemName as a python tupple. itemsetChildren itemsetChildren(listName, itemName, listOfChildren) Sets the list of children of itemName to the python tupple listOfChildren. itemtree() itemtree(listName, itemName, itemChild1, itemChild2, ...) Sets the list of children of itemName to itemChild1, itemChild2, etc. This routine performs the same action as itemsetChildren() but with another syntax.
ritemset, ritemget, ritemgo, ritemkey ritemset(machineName, itemName, editorName, value, editorName, value, ...) value = ritemget(machineName, itemName, editorName) ritemgo(machineName, itemName, editorName, value, delay, transition) ritemkey(machineName, item, EDITOR, 'curveKey', [transition], [delay], [’curve1D[yourTransitionCurve]’]) Perform like an itemset(), itemget(), itemgo() or itemkey but on a remote machine. machineName stands for the name of a machine in the network.
Now listName, itemName and editorName are still string parameters but value is a pointer to a C type depending on the editor being set or queried. But using strings as parameters in routines called in real time is not a good idea because every time the routine is called the pointer to the element has to be found out by searching through the whole list. That is why we provide another set of routines that allow to specify directly the pointer to the elements instead of their names.
editemToBell cbell * editemToBell(const char * listName, const char * itemName); cbell * bell = editemToBell(listName, itemName); Returns the cbell pointer to an item of a list. The pointer can be used later for the API routines expecting cbell pointers. editemGetBase void * editemGetBase(const char * listName, const char * itemName); Return the Base pointer for an element of a plugin generated list.
Thus, even if the pointer to the variable can be get through the editemget() routine nothing can done with it because there is no header specifying the type. We do not provide those headers because they change very often and should easily create incompatibilities between versions. Instead, we provide routines that allow to access the elements of the list: editemGetEditorListLength int editemGetEditorListLength(cbell * editorBell, void * ptr); Returns the number of elements in a value ptr of list type.
------------------------------------------------------void editemCreateContextVideoSync(); unsigned int editemWaitContextVideoSync(); unsigned int editemGetContextVideoSync(); int editemContextGetField(); Allow to create a new rendering context for the current thread, and wait or query for video syncs. ------------------------------------------------------void editemDeleteThread(int thread, int signal); int editemCreateThread(void * fun, void * arg); Creates and deletes threads.
Do not send other types than the expected. This is specially tricky for the family of integer and float structures (float2, integer2, float3, etc.). In Python syntax we always send vector() structures but in C they have to be correctly formed as integer or float structures. The only way you have to know if an editor accepts an integer or float structure is to look at its list in the interface and check what kind of values accepts.
Technical Support Information Most products feature a number of coverage options. Avid Assurance service offerings are designed to facilitate your use of Avid solutions. Service options include extended telephone coverage, automatic software maintenance, extended hardware warranty, and preferred pricing on replacement parts. Offerings and options may vary by product and are not available for all products. For more information regarding Avid’s service offerings, visit www.avid.