On Tue, 17 May 2016 4:33 AM <[email protected]> wrote: > thanks Justin. This is part of me trying to divide my big script into > modules. > > The script is to build a clean human mesh topology, when my script is run > it calls the module that sets up and configures what part of the body needs > to be rebuilt eg. hands/legs/feet/head/torso...or all. > > every part of the body requires a different setup to build. The arm > requires two curves and the hand needs 6 curves etc. So when this configure > module is called with a particular body part (the condition) eg hand. 6 > curve names will be returned (along with some other hand specific > variables) that will then be used in the 'run' module - which actually does > all the processing on the hand curves to generate the clean topology. > > this is why the function needed to return varying values, depending on the > body part condition its called with. >
The use case of your function sounds reasonable, havingit switch on different types of body parts to work on. But your return types seem like they could be cleaned up and normalised. Why not return a list of names and a dictionary of details, for any of those conditions? That means you only have two return values regardless of the number of names. Or better yet, you can fill a BodyResult class with names and details and return only one item. > But im sure the organisation of this is probably not wise, which is really > what im trying to discover at the moment, a cleaner approach. > > thanks for the help, > Sam > > -- > 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/a7d9daa0-2fc4-4947-b37d-84ce4c212187%40googlegroups.com > . > 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/CAPGFgA12QGJfjHa%3DnRBVA62wPuxqn6CVMjJ%3DV0A-HY3z2Yd4AA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
