pymel.core.windows.Callback

Inheritance diagram of Callback

class Callback(func, *args, **kwargs)

Enables deferred function evaluation with ‘baked’ arguments. Useful where lambdas won’t work...

It also ensures that the entire callback will be be represented by one undo entry.

Example:

import pymel as pm
def addRigger(rigger, **kwargs):
    print "adding rigger", rigger

for rigger in riggers:
    pm.menuItem(
        label = "Add " + str(rigger),
        c = Callback(addRigger,rigger,p=1))   # will run: addRigger(rigger,p=1)
class CallbackErrorLog

CallbackErrorLog(callback, exception, trace, creationTrace)

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__getstate__()

Exclude the OrderedDict from pickling

__repr__()

Return a nicely formatted representation string

callback

Alias for field number 0

creationTrace

Alias for field number 3

exception

Alias for field number 1

trace

Alias for field number 2

Callback.MAX_RECENT_ERRORS = 10
classmethod Callback.formatRecentError(index=0)
classmethod Callback.logCallbackError(callback, exception=None, trace=None, creationTrace=None)
classmethod Callback.printRecentError(index=0)
Callback.recentErrors = []