This can be used to reproduce one plug on another node, including special properties of said plug like min/max values, whether or not it shows up in the channel box, is it stored alongside the scene and so on.
>>> parent = createNode("transform")
>>> cam = createNode("camera", parent=parent)
>>> original = cam["focalLength"]
>>> clone = original.clone("focalClone")
# Original setup is preserved
>>> clone["min"]
2.5
>>> clone["max"]
100000.0
>>> cam.addAttr(clone)
>>> cam["focalClone"].read()
35.0
# Also works with modifiers
>>> with DagModifier() as mod:
... clone = cam["fStop"].clone("fClone")
... _ = mod.addAttr(cam, clone)
...
>>> cam["fClone"].read()
5.6
And fix a few minor issues too.
This can be used to reproduce one plug on another node, including special properties of said plug like min/max values, whether or not it shows up in the channel box, is it stored alongside the scene and so on.
Matrices are now also pretty-printed.