linkObjects(obj1 {Object}, obj2 {Object})

linkObjects(obj1 {Object}, obj2 {Object})
Link passed objects together. Neither is set to the active object in PluginController. Each will be added to the JSON if either or both are not already included.


obj1 and obj2, both {Object}s which have:

id: {String} unique ID for the object

type: {String} name for how the object will be stored within other objects. For example, if you had a selection object with ID ‘sel1′ and linked it to a shape ‘shp1′, ‘shp1′ would store your selections’s reference in an internal array of type, as specified by your type variable.

jsonName: {String} name for where the object is stored in the core JSON. If you use the same name as in type, it will store at the global level, along with pages. If you use TILEPAGE (current url), it will store it as a variable inside that page element

obj: {Object} Actual object to be inserted into the JSON session under the array jsonName