Using the world transform in a polyModifierNode correctly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am writing a polyModifierNode and currently I copy the shape to shapeOrig and then use shapeOrig.worldMesh[0] as inMesh for my node. The typical polyModifierNode plugs itself between shape.inMesh and the node producing the shape, i.e. polyCube1 --> myNode --> pCubeShape. But as far as I see then only the outMesh has a connection to the corresponding transform.
What's the maya way to do it?
Keep copying the mesh, so the inMesh has a worldMesh? This seems a bit unclean.
connect to worldMatrix from the outMesh?
This mixes inputs and outputs
connect to the transform object?
This may lead to chaos, if the meshes are reconnected and the transform is not.
The reason why I cannot use the "output" plug from polyCube with local coordinates is that my node has several inMeshes and depends on the distance of the meshes to each other. So I need world coordinates to merge the coordinates of multiple independed meshes together.