Regular API function

simCopyPasteObjects / sim.copyPasteObjects

Description Copies and pastes objects, together with all their associated scripts. Duplicate objects might be returned in a different order than the submitted original objects. If you need to copy, but not immediately want to paste the copy, then use sim.saveModel and sim.loadModel. See also sim.removeObject and sim.removeModel.
simInt simCopyPasteObjects(simInt* objectHandles,simInt objectCount,simInt options)
objectHandles: array containing the handles of the objects to copy and paste. The same array will receive the copied object handles, with the same correspondency.
objectCount: the number of handles contained in the objectHandles array.
options: bit-coded. If bit0 is set (i.e. 1), then whole models will be copied. In that case, all specified objects should be flagged as model base. If bit1 is set (i.e. 2), then all child and customization scripts are stripped away. If bit2 is set (i.e. 4), then all object custom data is stripped away. If bit3 is set (i.e. 8), then all object references are stripped away. If bit4 is set (i.e. 16), then all textures are stripped away. If bit5 is set (i.e. 32), then model tags and DNA information is stripped away.
return value
-1 if operation was not successful.
Lua synopsis table[] copiedObjectHandles=sim.copyPasteObjects(table[] objectHandles,int options)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Python synopsis list copiedObjectHandles=sim.copyPasteObjects(list objectHandles,int options)