sim.setReferencedHandlesAttaches a list of custom handles to a given scene object. Those custom handles are handles of other scene objects, that are linked to the given scene object (for whatever purpose). The advantage of storing references to other objects with this function is that CoppeliaSim will take care of correctly adjusting the references if needed: For instance, imagine objectA storing the handle of objectB via this function. If objectB is deleted, then the stored handle becomes -1. If objectA and objectB are duplicated at the same time, then the duplicate of objectA stores the handle of the duplicate of objectB. Optionally, if sim.handleflag_keeporiginal is specified, then linking to original objects is guaranteed, e.g. in above example, after a duplication of objectA, the duplicate of objectA will store the handle of the original objectB (if objectB still exists) Synopsissim.setReferencedHandles(int objectHandle, list referencedHandles)
sim.setReferencedHandles(int objectHandle, int[] referencedHandles)
Arguments
|