Regular API function

simGetObjectsInTree / sim.getObjectsInTree

Description Retrieves object handles in a given hierarchy tree. See also sim.getObjects.
C/C++
synopsis
simInt* simGetObjectsInTree(simInt treeBaseHandle,simInt objectType,simInt options,simInt* objectCount)
C/C++
parameters
treeBaseHandle: the handle of the object that describes the hierarchy tree, or sim.handle_scene for all objects in the scene.
objectType: the object type to retrieve or sim.handle_all for any type of object in the tree
options: bit-coded:
bit0 set (1): exclude the tree base from the returned array
bit1 set (2): include in the returned array only the object's first children. If treeBaseHandle is sim.handle_scene, then only parentless objects will be included.
objectCount (out value): the number of returned object handles
C/C++
return value
a pointer to an array containing object handles, or nullptr in case of an error. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua
synopsis
int[] objects=sim.getObjectsInTree(int treeBaseHandle,int objectType=sim.handle_all, int options=0)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
list objects=sim.getObjectsInTree(int treeBaseHandle,int objectType=sim.handle_all, int options=0)

<