
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
There seems to be a bug/issue when using custom MPxFieldNodes with nParticles in the latest version of the Maya API (2016.5 and 2017). I have checked and the issue was not present in any earlier version of the api. I thought it might be related to my code but I have also tested this out with an example plug-in shipped with the Maya devkit and encountered the same issue.
Repro steps are as follows:
1) Build the "torusField" example from the devkit for Maya 2016.5 or 2017
2) Create a torusField node
3) Create an nParticle node
4) Assign the torusField to the nParticle
5) Press play
6) In the output window you will notice this line being repeatedly printed to the screen:
ERROR in plug.logicalIndex.
7) Now if you try the same with a legacy particle this error message is not printed
The bug is triggered by line 135 of torusField.cpp. For some reason this line is returning an error stating that the plug is not an array element plug.
However what I have found is that the check on line 129:
if( !(plug == mOutputForce) )
Seems to be getting passed for both the multi plug and its elements and so the node functions correctly for the element plug but throws an error for the multi plug. This behavior never existed previously and also does not happen with legacy particles, which leads me to believe that there must have been a recent change to the way nParticles works that has caused this.
If someone from Autodesk can take a look and let me know if this is a bug or if there is a workaround (other than removing the error message) that would be great.
Thanks
Solved! Go to Solution.