(
local theXMeshLoader = XMeshLoader()
local theXMeshLayer = LayerManager.getLayerFromName "XMesh Loaders"
if theXMeshLayer == undefined do theXMeshLayer = LayerManager.newLayerFromName "XMesh Loaders"
theXMeshLayer.addnode theXMeshLoader
theXMeshLoader.viewportSequenceID = 0
theXMeshLoader.name = uniquename "XMesh_MultiWS31_"
theXMeshLoader.enableViewportMesh = true
theXMeshLoader.displayMode = 0
theXMeshLoader.displayPercent = 5.0
theXMeshLoader.limitToRange = true
select theXMeshLoader
theXMeshLoader.rangeFirstFrame = 0
theXMeshLoader.rangeLastFrame = 320
theXMeshLoader.viewportSequenceID = 0
theXMeshLoader.proxySequence = ""
theXMeshLoader.renderSequence = @"C:\Temp\xmeshes\XMESH_Biped_Bees_v001\Borislav\v0001\XMesh_MultiWS31_0000.xmesh"
local theMatLibPath = @"C:\Temp\xmeshes\XMESH_Biped_Bees_v001\Borislav\v0001\XMesh_MultiWS31_.mat"
if doesFileExist theMatLibPath do (
local theMatLib = loadTempMaterialLibrary theMatLibPath
if theMatLib != undefined do theXMeshLoader.material = theMatLib[1]
)
)