hello,

I though about sharing someting strange that occured to me. I had a method 
that contained
MPlug.destinations() which as an art requieres an MPlugArray(). For some 
reason, probably because I was in a hurry and I didn't thought about it, I 
casted all the MPlugs from MPlug.destinations() into a python list. Let's 
call it foo=list().
And that's where I started getting crashes. For instance, if I did 
something like
foo[0], which is supposed to hold an MPlug, maya return the MPlug okey, but 
if I did foo[0].isNull() it returned True and then crashed.

Whereas if you don't use a python list,  and query directly the MPlugArray  
(e.g, myMPlugArr[0].isNull) it returns False and everything is ok.

So my question more out curiosity than anything else. I know python lists 
are mutable objects, but not sure how or if that could be related.

Cheers,
R

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/62002c0d-0c72-43d0-9bd8-5e845d3d43b2n%40googlegroups.com.

Reply via email to