State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:335275|
Problem summary
_nukemath.Matrix4 objects cannot be de-pickled after pickling with the Python cPickle module.
Nuke should either warn the user before pickling the object that it cannot be de-pickled in a popup panel, or edit the object's source and make it not available to be de-pickled.
Customer reported version
nuke.10.5v6
Customer reported platform
ubuntu
Steps to reproduce
1) Open Nuke
2) Create a Camera node and add random values to the Transform, Rotate & Scale knobs
3) Copy and execute the following code snippet into the Script Editor:
import cPickle
pickled=cPickle.dumps(nuke.toNode('Camera1').knob('transform').value())
cPickle.loads(pickled)
# Result: Traceback (most recent call last):
File "<string>", line 3, in <module>
Boost.Python.ArgumentError: ('Python argument types in\n Matrix4.__init__(Matrix4, tuple, tuple, tuple, tuple)\ndid not match C++ signature:\n __init__(struct _object * __ptr64, class DD::Image::Matrix4)\n __init__(struct _object * __ptr64)\n __init__(struct _object * __ptr64)', <class '_nukemath.Matrix4'>, ((0.22458791732788086, 0.17590519785881042, -0.95847088098526, 0.0), (0.8072453141212463, 1.2041069269180298, 0.3855554759502411, 0.0), (0.8174724578857422, -0.5693809986114502, 0.08701443672180176, 0.0), (0.5799999833106995, 0.4489000141620636, 0.18930000066757202, 1.0)))
Within Nuke11.0v1 to Nuke11.1v1, there is a different exception displayed below (Nuke11.1v2 appears to have returned to the above exception)
# Result: Traceback (most recent call last):
File "<string>", line 3, in <module>
Boost.Python.ArgumentError: Python argument types in
Matrix4.__init__(Matrix4, tuple, tuple, tuple, tuple)
did not match C++ signature:
__init__(struct _object * __ptr64, class DD::Image::Matrix4)
__init__(struct _object * __ptr64)
__init__(struct _object * __ptr64)
We're sorry to hear that
Please tell us why