Description
|
Loads a previously saved model, and selects it. See also sim.saveModel, sim.loadScene, and sim.setBoolParameter with sim.boolparam_scene_and_model_load_messages.
|
C synopsis
|
simInt simLoadModel(const simChar* filename)
|
C parameters |
filename: model filename. The filename extension is required (ttm or simmodel.xml ). An optional "@copy" can be appended to the filename, in which case the model's objects will be named/renamed as if an associated script was attached to the model.
|
C return value
|
-1 if operation was not successful. Otherwise the handle of the model base object.
|
Lua synopsis
|
a) number objectHandle=sim.loadModel(string filename)
b) number 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). An optional "@copy" can be appended to the filename, in which case the model's objects will be named/renamed as if an associated script was attached to the model.
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) -1 if operation was not successful. Otherwise the handle of the model base object.
c)&d) nil if operation was not successful. Otherwise the model thumbnail image (128x128x4, rgba).
|
Remote API equiv.
|
|