It's been a long time i searched how to list all callbacks present in a nuke script...
And now i get it !
We can list them by type like knobChanged or onCreate and so on.
We acces by the callbacks module in .nuke :
nukeCallbacks = nuke.callbacks
And then use its variables by the type :
nukeCallbacks = nuke.callbacks allKnobChanged = nukeCallbacks.knobChangeds
Nuke list callbacks in a big dictionary with the node Class as key and its value as a list who contains the function to call and its arguments.
nukeCallbacks = nuke.callbacks
allKnobChanged = nukeCallbacks.knobChangeds
# Result:
{'Read': [(<function readFn at 0x00000000047A3EB8>, (101,), {}, None)], 'Write': [(<function writeFn at 0x00000000047A3D68>, (), {}, None)], '*': [(<function readFn at 0x00000000047A3EB8>, (101,), {}, 'Read1')], 'Roto': [(<function rotoFn at 0x00000000047A3DD8>, (), {}, None)]}
Here some types examples :
autolabels = {}
beforeFrameRenders = {}
beforeRenders = {}
filenameFilters = {}
knobChangeds = {}
onCreates = {}
onDestroys = {}
onScriptCloses = {}
onScriptLoads = {}
onScriptSaves = {}
onUserCreates = {}
updateUIs = {}
Aucun commentaire:
Enregistrer un commentaire