On Wed, Jun 8, 2016 at 11:38 AM Rudi Hammad <[email protected]> wrote:
> > Would you expect a Cartoon limb to always create a stretchy IK as part of >> its standard behaviour? >> > > yes > Then it would make more sense to do what I suggested instead of introducing a new special method name that only works if its a CartoonFeature. If you just override existing functionality from what you inherit, then you can keep treating them all as the same interface (polymorphism). > > >> >> def makeIk(self): >> # do normal ik logic >> super(CartoonFeatures, self).makeIk() >> >> # do stretchy part here >> >> In this version, it would mean that no matter what kind of BaseLimbRig >> you had, you could always call makeIk() on it. Because of it being OOP, the >> message dispatches to the correct receiver and you get different >> implementations. >> > > I don´t understand that. It is the first time I see super() in a method > that is not __init__() so I don´t quite get > You should read up on it. It is a way to call a method on the right super class. Just like you would call the super class __init__, you may want to override other methods and at some point call the superclass behaviour, in addition to your extended logic > > > >> > -- > 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/9227446d-47d5-42ef-94b7-4fd8f1cc7f9b%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/9227446d-47d5-42ef-94b7-4fd8f1cc7f9b%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA16-6iurV4CjxRGsNnRKKX9v1KD0ShDXhr_6h9ufd5uhw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
