You're right, some gui callbacks are called with on or more parameter, forgot about that one.
"partial" is a built-in function that python provides for doing what this Callback class does. As I said, this Callback class (and the *partial*function) is very basic, and doesn't deal with some issues: - Trying to Undo a gui event (for example a button-push) will not undo the entire action, rather fragments of it one at a time. The pymel Callback class takes care of that, wrapping the entire action into one undo-able piece. - Tracebacks get polluted with this callback code, making it harder to identify the source of problems. The pymel Callback class takes care of that as well, restoring the tracebacks to their original form. - Ofer www.mrbroken.com On Thu, Jan 13, 2011 at 12:32 AM, PixelMuncher <[email protected]> wrote: > Ofer > The asterisks were a problem, but I also had to change the call > command to include more than 1 arg: > def __call__(self, *args): > > Matt: > I've not encountered 'partial' before. It also worked. Is that > similar to a callback? > > Thanks again for all the help. > > -- > http://groups.google.com/group/python_inside_maya > -- http://groups.google.com/group/python_inside_maya
