Re: [Maya-Python] Can I pass arguments to plugins while I initialize them? OR the best way to inherit (get) values from initializing class?

2016-11-24 Thread Wesley Keeling
Hey Justin, thanks so much man! I did end up getting it, just responding to help anyone else: I am registering a node to update my attributes on update, but to pass values I just register a command that I just pass flags to to update: *mplugin.registerCommand('commandToCall', MethodName)* On Tue

[Maya-Python] Re: finding average of a list of coordinates

2016-11-24 Thread sam
ok, yea its probably best to do it one another line. I just thought there was a command that computed the center of a list of coords easier than constucting it manually. thanks for the help, Sam -- You received this message because you are subscribed to the Google Groups "Python Programming

[Maya-Python] Re: finding average of a list of coordinates

2016-11-24 Thread fruity
hi, if you want to do it absolutely in one line, maybe something like getCentroid = lambda inputs : [sum([a[x] for a in inputs]) / float(len(inputs)) for x in range(3)] if len(inputs) else None ? Then you can use getCentroid([[1, 0, 0], [0, 1, 0], [-1, 0, 0]]) for example. But why doing it i

Re: [Maya-Python] PLUG: Python for Maya: Udemy course

2016-11-24 Thread dgovil
Oh yeah tons of great courses on sale. @Marcus thanks! and the Roli Rise is really cool. I went with one of our TDs when he bought one...really crazy. -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe fr

[Maya-Python] finding average of a list of coordinates

2016-11-24 Thread sam
hello, this should be a simple one i guess, i have this so far: avrg_coords=[sum(x) for x in zip (*coord_list)] but i need to be able to divide the result by len(coord_list) to find the average. Is there a way i can add this into this line, or would i have to do this seperately? maybe there is