Maya XMesh Loader 0.1.0

  • Please report any problems you encounter in the XMesh Bug Reports forum.
  • Post your suggestions and other feedback in the XMesh Beta Discussion forum.

The supplied DLL is currently only for Maya 2011 64Bit on Windows. Other versions will be created at a later date.

The plugin consists of 1 main dependency graph node, and 2 auxiliary nodes. You will need to know how to script Maya to use the plugin as-is.

  • Dependency Graph Node sequenceXMesh:
  Attributes:
    [in]seqPath (string) - A path to the xmesh sequence.
    [in]inTime (time) - The time used to decide which frame of the sequence to load. Generally will be connected to 'time1' but 
                         can effectively make a playback graph if a expression is placed here.
    [out]outMesh (mesh) - The polymesh for the frame closest to inTime.

Connect the outMesh attribute of the sequenceXMesh to the inMesh attribute of a mesh node for the mesh to become visible in the scene.

MeshLoader.rar (495 KB)

MeshLoader-0.1.0.46075-maya2010-win64.zip (690 KB)

What’s New?
Added a groupIds[] attribute, which is used to assign faces to object groups based on their MaterialID. For example, groupIds[0] controls the groupId assigned to faces with MaterialID 0. Note that MaterialID 0 here corresponds to MaterialID 1 in 3ds Max.

Here is an example of its use. The xmesh file is a cube with MaterialIDs 0 through 5. In this example, we connect each of the MaterialIDs to an object group:

[code]$xmeshTransform = createNode transform;
$xmeshShape = createNode mesh -parent $xmeshTransform;
$xmesh = createNode sequenceXMesh;
setAttr ($xmesh+".path") -type “string” “c:/temp/local/box/test0000.xmesh”;
connectAttr time1.outTime ($xmesh+".time");
connectAttr ($xmesh+".outMesh") ($xmeshShape+".inMesh");

for($i = 0; $i < 6; ++$i) {
$groupNode = createNode groupId;
$shadingGroup = sets -renderable true -noSurfaceShader true -empty -name ("face"+string($i)+"SG");
connectAttr ($groupNode+".groupId") ($xmesh+".groupIds["+string($i)+"]") -force;
connectAttr ($groupNode+".message") ($shadingGroup+".groupNodes") -nextAvailable;
connectAttr ($xmeshShape+".instObjGroups[0].objectGroups["+string($i)+"]") ($shadingGroup+".dagSetMembers") -nextAvailable;
connectAttr ($groupNode+".groupId") ($xmeshShape+".instObjGroups[0].objectGroups["+string($i)+"].objectGroupId");
connectAttr ($shadingGroup+".memberWireframeColor") ($xmeshShape+".instObjGroups[0].objectGroups["+string($i)+"].objectGrpColor");
} [/code]
MeshLoader-0.1.1.46168-maya2010-win64.zip (698 KB)