Anatomist commands reference: DuplicateObject


DuplicateObject

New in Anatomist 3.1.
Duplicates an existing object, doing a deep or shallow copy of it. Object duplication is especially useful when needing to assign severeal palettes/materials to a single data.
Objects copying is object-dependent and is not a mandatory feature of all object types: some objects may not be able to be copied. So this command may fail and do nothing. So it is better to check the result unless you exactly know which object you are duplicating. Check can be achieved via the ObjectInfo command on the res_pointer ID.
Attribute: Type: Description:
source int source object ID, to be duplicated
res_pointer int ID of the copy object
hidden int (optional) A hidden object does not appear in Anatomist main control window.
shallow int (optionnel) A shallow copy will try to share the same underlying low-level data (volume data block, mesh veretices/polygons etc), whereas a deep copy will try to duplicate everything. We say "try" here because the actual copy operation is object-dependent, may not be implemented at all and so can fail.
Default: 1 (actualy shallow)

Back to commands index