Regular API function

simLoadModel / sim.loadModel

Description Loads a previously saved model, and selects it. See also sim.saveModel, sim.loadScene, and sim.setBoolParam with sim.boolparam_scene_and_model_load_messages.
C/C++
synopsis
simInt simLoadModel(const simChar* filename)
C/C++
parameters
filename: model filename. The filename extension is required (ttm or simmodel.xml ).
C/C++
return value
-1 if operation was not successful. Otherwise the handle of the model base object.
Lua synopsis
a) int objectHandle=sim.loadModel(string filename)
b) int objectHandle=sim.loadModel(string buffer)
c) string rgbaImage=sim.loadModel(string filename,bool onlyThumbnail)
d) string rgbaImage=sim.loadModel(string buffer,bool onlyThumbnail)
Lua parameters
a) filename: model filename. The filename extension is required (ttm, or simmodel.xml).
b) buffer: a buffer containing the model
c)&d) onlyThumbnail: when true, then only the thumbnail image of the model will be loaded and returned
Lua return values
a)&b) the handle of the model base object.
c)&d) the model thumbnail image (128x128x4, rgba).
Python synopsis
a) int objectHandle=sim.loadModel(string filename)
b) int objectHandle=sim.loadModel(bytes buffer)
c) bytes rgbaImage=sim.loadModel(string filename,bool onlyThumbnail)
d) bytes rgbaImage=sim.loadModel(bytes buffer,bool onlyThumbnail)