MPxGeometryFilter help sample code not working on Maya 2022 latest updates (tested on 2022.4 and 2022.5)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
We are using some nodes inheriting from MPxGeometryFilter for our plugin. After meeting some bugs and doubting about our implementation, we went back to testing the vanilla sample using ::compute() method that can be found on the help :
https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=Maya_SDK_cpp_ref_class_m_px_geometry_filter_htm...
We use compute() and not deform(), as we do have some computation to do for all inputs at once, namely an IA inference.
This sample code has only been modified to get the envelope value, and shift all vertices by envelope value in 3 dimensions, in order to see quickly if things are working. Deformation code is :
float envelopeValue = dataBlock.inputValue(envelope).asFloat();
It has been built for 2022.4, 2022.5 and 2020.4.
On 2020.4, things are all good, the input mesh is shifted in all directions (tested with a basic cube in 0,0,0).
But on 2022.4 and 2022.5, the exact same code does not work. In debug mode, I can see that the iterator directly goes to the end of loop as if it had no vertex.
I tried using the deform() method and put this code as deformation, and things are OK with it.
What has changed in the MPxGeometryFilter default compute, or geometry iterator code, since 2020.4 ? Could you point me the the required modifications to use a custom MPxGeometryFilter::compute() method or send me the default implementation of MPxGeometryFilter ::compute for 2022.4 and further versions ?
Thank you
Sebastien / Golaem