Hi! And thanks for respond! :)

The way I find to avoid this prob is to never use MFloat(Point/Matrix/
etc...) with python. Just use M(Point/Matrix/etc...).

You was right! the prob was that I use MFloatPointArray instead
MPointArray. Anyway:

myMPointArray[i] should be a MPoint. But this crash:

inMeshMPointArray = OpenMaya.MPointArray()
inMeshMPointTmp = OpenMaya.MPoint()

for i in range( inMeshMPointArray.length() ) :
    inMeshMPointTmp = inMeshMPointArray[i]
    inMeshMPointTmp *= inMeshInclusiveMMatrix



And this don't crash:

inMeshMPointArray = OpenMaya.MPointArray()
inMeshMPointTmp = OpenMaya.MPoint()

for i in range( inMeshMPointArray.length() ) :
    inMeshMPointTmp = OpenMaya.MPoint( inMeshMPointArray[i] )
    inMeshMPointTmp *= inMeshInclusiveMMatrix

I "capsulate" the inMeshMPointArray[i] in a OpenMaya.MPoint() to use
it without have a maya segmentation fault (linux).

My prob is solve anyway (but Python Maya API is full of surprise :-( )

Thanks and have a good day!

On 29 sep, 10:19, Viktoras <[email protected]> wrote:
>   inMeshMPointArray is MFloatPointArray? that looks much easier for  me
> to convert to MPoints. if you're getting that via MFnMesh.getPoints(),
> there's the MPointArray version too.
>
> On 2010.09.28 17:23, Narann wrote:
>
> > inMeshMPointArray[i] *= inMeshInclusiveMMatrix    # multiply the
> > points to the matrix
>
> > The prob is the * operator only work with MFloatMatrix and me, I give
> > a MMatrix.
>
> --
> Viktoraswww.neglostyti.com

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to