Re: [Maya-Python] maya api question

2016-07-27 Thread Justin Israel
On Thu, Jul 28, 2016 at 7:20 AM likage 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

Re: [Maya-Python] maya api question

2016-07-27 Thread likage
> > 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,

Re: [Maya-Python] maya api question

2016-07-26 Thread Alok Gandhi
You are returning a cross product when smooth is false. A cross product is a vector. Also as I said before, your example does not show implementation of getCrossProduct() so it is not clear what actually you are returning. But again, as I mentioned earlier, if your method name is getCrossProduct()

Re: [Maya-Python] maya api question

2016-07-26 Thread Justin Israel
On Wed, Jul 27, 2016 at 10:39 AM likage wrote: > I do not have any code to show. This is something that I have copied and > paste somewhere.. > > But if say I manage to have some values and I set a variable as 'test. > asMPoint()', am I correct to say that it will try to

Re: [Maya-Python] maya api question

2016-07-26 Thread likage
I do not have any code to show. This is something that I have copied and paste somewhere.. But if say I manage to have some values and I set a variable as 'test. asMPoint()', am I correct to say that it will try to read in 3 values and it will be using the class Point, asMPoint function? And

Re: [Maya-Python] maya api question

2016-07-26 Thread Justin Israel
On Wed, 27 Jul 2016, 4:51 AM likage wrote: > Why do you thing it would be returning a list vs a dict vs other? And I >> don't mean these questions in a condescending way. I think it would be good >> to hear your thought process on how you view the way a class works. Then

Re: [Maya-Python] maya api question

2016-07-26 Thread likage
> > Why do you thing it would be returning a list vs a dict vs other? And I > don't mean these questions in a condescending way. I think it would be good > to hear your thought process on how you view the way a class works. Then we > can address the specifics. What do you expect to get back

Re: [Maya-Python] maya api question

2016-07-26 Thread Alok Gandhi
I would comment on the second part of your question : Regarding the getNormal() method, the short answer is yes. To write clean readable code, the only thing that is of importance (more so in python) is to name your methods, variable with utmost care. Since getNormal() would return a MVector in

Re: [Maya-Python] maya api question

2016-07-25 Thread Justin Israel
On Tue, Jul 26, 2016 at 1:04 PM likage wrote: > Hi all I am trying to do and learn some maya api (I have zero knowledge of > them) > The following code was taken from an example that I have read online and > while testing it out, I have a few questions in mind.. > > 1. In

[Maya-Python] maya api question

2016-07-25 Thread likage
Hi all I am trying to do and learn some maya api (I have zero knowledge of them) The following code was taken from an example that I have read online and while testing it out, I have a few questions in mind.. 1. In that test() function, as the world_pos variable is calling out to the Point