PDA

View Full Version : MFnMesh::getIntBlindData() bug in Maya API?


MatthiasBuehlmann
11-26-2008, 09:27 PM
Hi!

i'm using the function


MFnMesh::getIntBlindData ( MFn::Type compType, int blindDataId, MString attrName, MIntArray & compIDs, MIntArray & data)


=>


myMeshFn.getIntBlindData(MFn::kMeshVertComponent,ID,"attributeName",indexArray, dataArray);



in order to return a whole buch of BlindData at once.

so - what i would expect now is, that if indexArray is for example [5,9,2], then my dataArray would carry the blindData for the fifth, the nineth and the second vertex after the functionCall.

However, what happens is that - independant from the content of 'indexArray' - dataArray will always hold the blindData of the first, the second, the third.... vertex. Such, they are returned always in the same order. (took me quite a while to trak that down...)

Is this a Bug in the Maya API or did i simply misunderstand the purpose of the "MIntArray & compIDs" argument?


Thanks!

Keilun
11-27-2008, 08:07 PM
I haven't used that particular call before, but I believe you might have misunderstood the function. Both compIDs and dataArray are outputs. This method appears to return all blindData of the given type/attrName on a given component on the current mesh.

I don't think you are intended to pass in an array and have it conveniently return you the intBlindData in the order of the indices you used. If you want to do that, it's probably best to use the per-compID version.

MatthiasBuehlmann
11-28-2008, 09:54 AM
yeah - i use now a for loop and read every single component one after another.

But I still think the version with the two arrays is buggy, since the other array is not altered at all by the call, so it's kind of useless.

Anyway - it's finally finally working :)) thank you so much for your help!

CGTalk Moderation
11-28-2008, 09:54 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.