ID 335275 - _nukemath.Matrix4 objects cannot be de-pickled when attempted it throws exceptions

Follow

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: Nuke will receive the following exception:
​# 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)

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:

Nuke11.1v2 - Windows 7 - Mac10.12 - CentOS6.9
Nuke11.1v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke11.0v4 - Windows 7 - Mac10.12 - CentOS6.9
Nuke11.0v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.5v7 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.5v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.0v6 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.0v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke9.0v9 - Windows 7 - Mac10.12 - CentOS6.9
Nuke9.0v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke8.0v7 - Windows 7 - Mac10.12 - CentOS6.9|
Nuke7.0v10 - Windows 7 - Mac10.12 - CentOS6.9

Earliest version tested
- This issue appears to be in all versions of the product 

Expected behaviour
Nuke should throw a warning before de-pickling a _nukemath.Matrix4 object.

Actual behaviour
Nuke throws the Boost.Python.ArgumentError exception (displayed in the reproduction steps above)

    We're sorry to hear that

    Please tell us why