pymel.core.windows.Callback

digraph inheritanced880e6c393 { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "Callback" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",style="setlinewidth(0.5)",tooltip="Enables deferred function evaluation with 'baked' arguments.",height=0.25,shape=box,fontsize=8]; }

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 = []