GLTF Plugin API reference

Plugin for glTF format support

simGLTF.animationFrameCount
simGLTF.clear
simGLTF.exportAllObjects
simGLTF.exportAnimation
simGLTF.exportObject
simGLTF.exportObjects
simGLTF.exportSelectedObjects
simGLTF.exportShape
simGLTF.loadASCII
simGLTF.loadBinary
simGLTF.recordAnimation
simGLTF.saveASCII
simGLTF.saveBinary
simGLTF.serialize

simGLTF.animationFrameCount

Description Return count of animation frames.
Lua synopsis int count=simGLTF.animationFrameCount()
Lua parameters -
Lua return values
count (int): count of frames
See also

simGLTF.clear

Description Clear all data stored in memory (geometry, material, animation, cache).
Lua synopsis simGLTF.clear()
Lua parameters -
Lua return values -
See also

simGLTF.exportAllObjects

Description Export all objects to glTF model.
Lua synopsis simGLTF.exportAllObjects()
Lua parameters -
Lua return values -
See also

simGLTF.exportAnimation

Description Export animation data to glTF model.
Lua synopsis simGLTF.exportAnimation()
Lua parameters -
Lua return values -
See also

simGLTF.exportObject

Description Export object to glTF model.
Lua synopsis int nodeIndex=simGLTF.exportObject(int objectHandle)
Lua parameters
objectHandle (int): handle of the object
Lua return values
nodeIndex (int): index of the new node (may contain sub-nodes)
See also

simGLTF.exportObjects

Description Export objects to glTF model.
Lua synopsis simGLTF.exportObjects(table[] objectHandles)
Lua parameters
objectHandles (table of int): handles of the objects
Lua return values -
See also

simGLTF.exportSelectedObjects

Description Export selected objects to glTF model.
Lua synopsis simGLTF.exportSelectedObjects()
Lua parameters -
Lua return values -
See also

simGLTF.exportShape

Description Export shape to glTF model.
Lua synopsis int nodeIndex=simGLTF.exportShape(int shapeHandle, int parentHandle=-1, int parentNodeIndex=0)
Lua parameters
shapeHandle (int): handle of the shape
parentHandle (int, default: -1): handle of the parent object. if specified the matrix of the node will be relative to this. use this in conjunction with parentNodeIndex parameter.
parentNodeIndex (int, default: 0): index of parent node
Lua return values
nodeIndex (int): index of the new node (may contain sub-nodes)
See also

simGLTF.loadASCII

Description Load an ASCII glTF model.
Lua synopsis bool result, string warnings, string errors=simGLTF.loadASCII(string filepath)
Lua parameters
filepath (string):
Lua return values
result (bool): true if success
warnings (string): warning message(s)
errors (string): error message(s)
See also

simGLTF.loadBinary

Description Load a binary (.glb) glTF model.
Lua synopsis bool result, string warnings, string errors=simGLTF.loadBinary(string filepath)
Lua parameters
filepath (string):
Lua return values
result (bool): true if success
warnings (string): warning message(s)
errors (string): error message(s)
See also

simGLTF.recordAnimation

Description Export animation data to glTF model.
Lua synopsis simGLTF.recordAnimation(bool enable)
Lua parameters
enable (bool): if true the plugin will record the pose of all objects during simulation
Lua return values -
See also

simGLTF.saveASCII

Description Save a glTF model to an ASCII file.
Lua synopsis bool result=simGLTF.saveASCII(string filepath)
Lua parameters
filepath (string):
Lua return values
result (bool): true if success
See also

simGLTF.saveBinary

Description Save a glTF model to a binary file.
Lua synopsis bool result=simGLTF.saveBinary(string filepath)
Lua parameters
filepath (string):
Lua return values
result (bool): true if success
See also

simGLTF.serialize

Description Serialize glTF model to JSON string.
Lua synopsis string json=simGLTF.serialize()
Lua parameters -
Lua return values
json (string): the JSON document
See also