Hi Sam.
What you want to make is basically a python 'package' . I.e, a dir with a sensible name, containing the seperate scripts ('modules'), plus an __init__.py file. The folder (package) is then its own import call as long as it is in your python path. So lets say your package/folder is called 'character' :
In this 'character' folder you have a blank text file called __init__.py which can serve further purposes, but essentially is there to recognise this package on import. Now its all down to namespaces. So you can put a script in here called 'hands.py' for example.
Your call to a function in your 'hands' module would be something like :
Import character as char
Import char.hands
char.hands.buildHands()
In here you can import legs, arms or anything else in the hands module or whatever. But you can also use a userSetup.py within your 'character' package. Put all your imports there if you like. So when you :
Import character
It will import all modules as per names/imports you've specified in your userSetup automatically, that you can now refer to directly. Just don't loose track of your designated namespaces and be consistant with them if you don't want confusion in module-to-module function calls.
As for class's...it is not imperritive to make everything you do object oriented. Classes are primarily a tool for instanciatian and inherritance. Maybe slightly overkill for just running functions that perform simple algorythms. Depends how you prefer to script and if the task your completing requires it.
Hope that helps
Simon
Sent from my iPhone
> --
> 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
python_inside_m...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/605c97e4-0835-4054-a9a2-0aaa53036828%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.