Regular API function

simAddObjectToSelection

Description Adds an object to the selection. See also simRemoveObjectFromSelection and simGetObjectSelection.
C synopsis simInt simAddObjectToSelection(simInt what,simInt objectHandle)
C parameters
what: indicates what we want to add. Valid values are sim_handle_single (adds just one object), sim_handle_all (adds all objects in the scene), sim_handle_tree (adds the tree with base objectHandle (inclusive)) and sim_handle_chain (adds the chain with tip objectHandle (inclusive))
objectHandle: handle of an object. Doesn't have a meaning if "what" is sim_handle_all
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis
There are two versions of this function:
(1) number result=simAddObjectToSelection(number what,number objectHandle)
(2) number result=simAddObjectToSelection(table objectHandles)
Lua parameters
(1) Same as C-function. The second argument can be omitted if "what" is sim_handle_all
(2) objectHandles: table of object handles. Can be nil
Lua return values
Same as C-function

All regular API functions on one page