Here it says it has deapcopy:
panda3d.org/reference/python … fc7f3ad191
But when i use it it does not:
root = self.root.deepcopy()
AttributeError: 'libpanda.NodePath' object has no attribute 'deepcopy'
Here it says it has deapcopy:
panda3d.org/reference/python … fc7f3ad191
But when i use it it does not:
root = self.root.deepcopy()
AttributeError: 'libpanda.NodePath' object has no attribute 'deepcopy'
It’s the deepcopy function from the python copy module, I think.
Right, the method name is actually deepcopy, but it looks like the API doc generator doesn’t know that interrogate treats this name as a special case, and it renames it deepcopy() for the documentation. (rdb: perhaps we should add this, and the other method names listed in interfaceMakerPythonNative.cxx, to the exception list.)
In any case, you’re not supposed to call it directly; as its usage comment explains, it’s an internal method meant to be invoked by Python’s own copy.deepcopy, e.g. np2 = copy.deepcopy(np).
This, incidentally, does precisely the same thing as np2 = np.copyTo(NodePath()).
David