|On this page|
It is often useful to make a copy of an attribute before doing some destructive operations. Attribute Swap makes it straightforward to copy, stash, or move attributes.
This applies to the all the values of the attribute, so there is no group to restrict the operation. This allows for most operations to be very efficient in both time and memory as they can just clone or rename the source attribute.
Number of Swaps
The number of different swaps to do. These are performed in the order specified, so the results of the first set of swaps will be what is processed by the second set.
Enables or disables the processing of this swap command. This is useful for testing the effect of a swap or disabling a swap while setting up the commands.
Each attribute pair that matches the Source/Destination patterns will under go this operation.
The two attributes are swapped in-place. If one does not exist, this will behave like a Copy with the destination set to the missing attribute.
The destination attribute, if it exists, is destroyed. The source attribute is then renamed to the destination name.
This matches the Attribute Rename SOP with Overwrite Existing Attributes turned on.
You cannot move the point attribute
P as it must always exist, it will silently convert to a copy operation.
The destination attribute, if it exists, is destroyed. A copy of the source attribute is made with the destination name. The result is a duplication of the source attribute.
The class of attributes to swap. (vertex, point, primitive, or detail).
A pattern to match attributes to be the source of the attribute pairs. For each attribute that matches this pattern, the Destination parameter is used to derive a new destination name.
See Attrib String Edit for more details of the string replacement.
A matching pattern to Source to control the names of the destination attributes. When in Swap mode, this is pattern is also tested against attributes for potential swaps.
Attributes contain extra meta-data describing how they should be transformed.
When stashing an attribute like
P, you probably don’t want the stashed attribute to transform with successive deformers. Preserve Destination will ensure the new attribute has no transform hints. Preserve Destination also can be used when moving the attribute back, so the resulting
P keeps its transform hint.
When moving or copying, the destination attribute will have the same transform hints as the source attribute. When swapping, the typinfo will be swapped with the attribute.
When moving or copying, the type info of the previous destination attribute will be kept. If there was no previous attribute, the void type info will be used.
When swapping, the type info will be left un-swapped after the attributes are swapped.
Variable names ending with
2 refer to the geometry from the second input, if applicable. For example,
PT2 is the current point number from the second input.
The seconds a particle in the template has been alive.
Arc length distance from root in the L-systems.
The surface area of the primitive (created by the Measure SOP).
BBX, BBY, BBZ
The point’s relative position in the bounding box.
Point or vertex alpha value.
CEX, CEY, CEZ
The centroid of the geometry.
COMX, COMY, COMZ
Center of mass.
CR, CG, CB
Diffuse point or vertex color.
Point or vertex crease weight value.
Stores the currently processed layer for texture/materials (set by the Layer SOP).
Distance from particle to last collision.
Number of divisions to build the circle swept with Polywire (created by L-systems).
Generation in the L-systems.
The ID of the particle in the input.
The age of the point in the L-system computation.
Percent of total life used (from 0 to 1).
Level of detail.
MAPU, MAPV, MAPW
Point or vertex texture coordinates.
The string name of the current material (the value of the
The number of layers that are considered active for display.
The total number of points in the template geometry.
NX, NY, NZ
The perimeter of the primitive (created by the Measure SOP).
Primitive number & total number of primitives.
The point number of the currently processed point.
RESTX, RESTY, RESTZ
The rest position.
Number of segments to divide a curve up into in Polywire (created by L-systems).
SIZEX, SIZEY, SIZEZ
The size of the bounding box.
Elasticity of a point.
Spring tension of an edge.
TX, TY, TZ
UPX, UPY, UPZ
The vector pointed in the up direction.
Vertex number & total number of vertices.
VX, VY, VZ
Point spline weight.
The width of the curve. Used by mantra for rendering curves & polywire for generating trees.
The X extents of the bounding box of the geometry.
The Y extents of the bounding box of the geometry.
The Z extents of the bounding box of the geometry.