Long answer, I know, but I mentioned it was kind of tricky. I hope you got it to work. Let me know if you have any questions.
-jason aka:'Count 0' On Tuesday, March 26, 2013 5:08:58 AM UTC-7, simon payne wrote: > Brilliant thanks :-) > > > On Thursday, March 21, 2013 8:04:10 AM UTC-7, Count Zer0 wrote: > > > OK. Got the full answer done. Check it out here: > > > > > > http://www.jason-parks.com/artoftech/?p=520 > > > > > > Hope this helps. > > > > > > -jason > > > > > > On Tuesday, March 12, 2013 1:35:08 PM UTC-7, Count Zer0 wrote: > > > > On Tuesday, March 12, 2013 5:22:55 AM UTC-7, simon payne wrote: > > > > > Does anyone know if it is possible to inherit the pymel Transform class > > > > ? > > > > > > > > > > myObj = pymel.core.nodetypes.Transform('pCube1') > > > > > myObj.getTranslation() > > > > > # Result: dt.Vector([0.0, 0.0, 0.0]) # > > > > > > > > > > ....so....using the class Transform is fine. but.... : > > > > > > > > > > > > > > > class myNewClass(pymel.core.nodetypes.Transform): > > > > > def __init__(self): > > > > > pass > > > > > > > > > > > > > > > results in : > > > > > # TypeError: Determined type is Transform, which is not a subclass of > > > > desired type myNewClass # > > > > > > > > > > ???? Any ideas? > > > > > > > > It is. Kind of tricky. Been meaning to do a post about how to do it. I'll > > > put it on the top of my list and post link here. > > > > > > > > Answers are here if you want to decrypt on your own: > > > https://github.com/LumaPictures/pymel/blob/master/examples/customClasses.py -- 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 post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
