On Thu, Jul 28, 2016 at 7:20 AM likage <dissidia....@gmail.com> wrote:

> Yes exactly. That was the missing bit. You weren't showing the part that
>> you just described.
>>
>
>
>> When you call asMPoint(), you will be creating an instance of MPoint from
>> your instance variables x, y, and z and returning it. It should be pretty
>> obviously what is being called, when you actually call it directly.
>
>
> In this code of mine, I was getting confused because it seems to be
> calling a function within a function / function within a class etc, again,
> this is just a small portion of the code..
> For eg.
> current_pt = om.MFloatPoint()
>
> hit_01 = om.MScriptUtil()
> hit_02 = om.MScriptUtil()
> hit_01.createFromInt(0)
> hit_02.createFromInt(0)
> ...
> ...
>
> return FindThis(Point(current_pt.x, current_pt.y, current_pt.z), hit_01.
> getInt(...), ...)
>
> Basically it seems to be 'calling' from all other classes/functions in
> which they are using maya api too.
> Which is why when I tried to do a debug trying to find out what types the
> variables are, I had thought it will give me a more direct answer -
> MVector, MPoint etc, just like the type() command which will tell me
> whether if it is a dict, str etc.
>
> Pardon me if I did not phrase it all out correctly and properly which has
> causes some misunderstandings/ frustrations...
>

Unfortunately I am still a bit confused about your question...
It is the bit about "calling from all other classes". When I look at your
example code, it seems very apparent to me that you are constructing your
own custom Point() instance, by passing some data into it. The Point
instance is passed to the FindThis() call, along with the results of those
getInt() calls.



> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/dc9f3aec-5dd7-4a3a-a518-8615bd3da55c%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/dc9f3aec-5dd7-4a3a-a518-8615bd3da55c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2Ym22q1mkHT7ZYuDa8LOMPisFR2GXgGitNFQSRWNQwpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to