Change topology of mesh during animation


Hello everyone.

I am doing a plugin that updates meshes under several circunstances, using always maya callbacks. So when timeChanged callback is received, i just modify all the things i have to. This procedure is working well while the topology of the mesh does not change.

If the topology of the mesh changes, the procedure raise several exceptions, which are quite different depending on the evaluation mode (DG and Parallel).

My next attempt has been to create a MPxNode that outputs a Mesh data and connect it to a meshShape. And the results are quite weird, because it works while the meshShape is not connected to any material. If i connect it the geometry starts to update in a wrong way.

Any advice around?

Thank you