Hi Enrico,

I’m not very acquainted with the API, and maybe I’m not understanding you
correctly, but Python passes everything as references to other objects.

# This would pass `my_iterator` as reference to `maya_function`
maya_function(my_iterator)

If you could provide a short snippet of your issue, I might be able to help
more.

Best,
Marcus
​


On 10 June 2014 14:58, Enrico Losavio <[email protected]> wrote:

> Hi everyone.
> I'm new to Maya Python API. I've been studying it since a couple of months
> and now I'm trying to write my first script (to be later adapted into a
> node).
> I'm writing a main function to iterate through a mesh, and a few secondary
> functions to retrieve certain information about it.
> The point is, everytime i call a function I have to recreate the
> iterators, function sets and everything i need in order to make it work.
> This seems a lot like a waste of code  and of performances.
> Do you know if there is a way to pass the iterators or any Maya object to
> a function as pointers? I know python doesn't deal with pointers, but it
> would be so much easier. I've tried to look in the MScriptUtil
> documentation, but i couldn't find anything helpful
>
> Thanks for the help!
>
> --
> 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/d5207b32-1472-4e51-90dd-fc4affbf4154%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/d5207b32-1472-4e51-90dd-fc4affbf4154%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
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/CAFRtmODmmPnGLULsPD-sMu6-8YwJX2X4-HAPZbnVNsurDyfzxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to