Doc > Nodes > SOP > AttribCopy

Doc > Nodes > SOP > AttribCopy

Copies an attribute from one geometry to another.

Description

This copies an attribute from the right input geometry to the left input geometry. Note that you can copy attributes that have different sizes. For instance:

  • to copy only the y component of the position to a float attribute, set it as such:
    • srcOffset = 1
    • destOffset = 0
  • to copy the y component to the z component of another attribute:
    • srcOffset = 1
    • destOffset = 2
  • if you copy from a float to a float:
    • srcOffset = 0
    • destOffset = 0

Parameters

Name Type Description
name string name of the attribute to copy
tnewName boolean toggle if you want to copy to another name
newName string the new name of the attribute
srcOffset integer this defines which component the copy starts from. If you want to copy the whole attribute, leave it at 0. If you want to copy only the y component, set it to 1. If you want to copy the z component, set it to 2. Note that this only makes sense if you copy from an attribute that has enough components to copy from. So setting it to 2 (for z) to copy from a vector2 attribute will raise an error.
destOffset integer this defines which component the attribute is copied to

Examples

Is this doc helpful/not helpful? Is there any information you would like that is not available? Don't hesitate to get in touch with any question or feedback, either by email, on Discord or the forum.