State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:157497|
The function _removeCallback uses an incorrect variable which results in a NameError.
Reported on:
nuke7.0v5 linux CentOS 2.6.32-279.14.1.el6.x86_64
Reproduced on:
Nuke6.2v3 - 7.0v6
Steps to reproduce:
1) Launch Nuke and run the below python in the script editor.
2) Once the py code is executed you will encounter an error that states callbacks.py has an undefined global name "call" on line 388.
3) If you open callbacks.py and change the variable on line 388 from "call" to "filter" this will fix the issue.
===== 1) py code =====
def foo(bar):
return bar
nuke.addAutoSaveFilter(foo)
nuke.removeAutoSaveFilter(foo)
========================
====== 2) error ========
Traceback (most recent call last):
File "", line 5, in
File "/apps/Linux64/nuke/nuke7.0v5/plugins/nuke/callbacks.py", line 388, in
removeAutoSaveFilter
_removeCallback(autoSaveFilters, call, (), {}, 'Root')
NameError: global name 'call' is not defined
==========================
====== 3) callbacks.py =======
def removeAutoSaveFilter(filter):
"""Remove a previously-added callback with the same arguments."""
_removeCallback(autoSaveFilters, call, (), {}, 'Root')
==============================
Host(s):
We're sorry to hear that
Please tell us why