Thanks Dean, your still the API gooroo. > To get around this, the Maya API provides the MScriptUtil class which > can be used to generate a pointer or reference to an elementary type, > or to extract a value from a pointer to an elementary type. > I see. So this PySwigObject is the object that holds the data internally and getFloatArrayItem is simply a "convenient" wrapper function to query the items? I can't find any documentation about this class in the API docs. Where can I find more information about MScriptUtil?
> In your case you can use > maya.OpenMaya.MScriptUtil.getFloatArrayItem(densityValues, i) to > retrieve the i'th value from the array Its working fine now, thanks. And how can I modify the content of this array if I'd like to modify the density values? And by the way, after getting density working I advanced to level 2 with MFnFluid.getVelocity. getVelocity expects three float array pointers. I thought that something like this might work: xVel = OpenMaya.MScriptUtil().asFloatPtr() yVel = OpenMaya.MScriptUtil().asFloatPtr() zVel = OpenMaya.MScriptUtil().asFloatPtr() fluidNode.getVelocity(xVel, yVel, zVel) But of course I was totally wrong. I got this error message: # TypeError: argument number 2: a 'floatArrayPtr' is expected, 'PySwigObject(_p_float)' is received # Cheers, Szabolcs --~--~---------~--~----~------------~-------~--~----~ Yours, Maya-Python Club Team. -~----------~----~----~----~------~----~------~--~---
