Houdini 20.5 Nodes Geometry nodes

Attribute String Edit geometry node

Edits string attribute values.

On this page

The attributes may be explicitly specified in the corresponding attribute text field. Exclusion is specified by preceding an attribute name with the caret character (^). All available attributes can be specified by leaving the field blank or entering an asterisk (*) in the field. If the first attribute is preceded by a caret then all attributes are assumed to be transferred except where explicitly excluded. In all other cases, no attributes are assumed except where explicitly included. Note that only string and index-pair attributes are considered.

Tip

To edit string properties of index-pair attributes, the property can be specified by appending its name (separated by a . character) to the attribute name. For example, including boneCapture.pCaptPath in the attribute pattern will edit the capture region names in the boneCapture attribute.

The active filters that are defined in the Editor tab are applied in sequence to the attributes that are specified in the Attributes tab.

The From and To parameters are any string patterns like str[1-9:2] or t[xyz]. The From parameter also allows matching patterns like str* and str?.

Examples

From To Produces
str1 str2 str3 tx ty tz tx ty tz
str[1-3] t[xyz] tx ty tz
str[1-3] tx ty tz rx tx ty tz
str[1-2] tx ty tx ty str3
t[xyz] [XYZ]trans Xtrans Ytrans Ztrans
bob* carol* Changes strings that start with bob to start with carol.
*hand* *foot* Replaces the string hand with the string foot.
*_* *(1)_*(0) Swap the matched text on either side of the underscore.

Assuming an input of str1 str2 str3:

str? t? t1 t2 t3
* op:* op:str1 op:str2 op:str3
*r* *ring* string1 string2 string3
*[1-3:2] foot[11-13:2] foot11 str2 foot13
* string[3,1,2] string3 string1 string2

Parameters

Attributes

Detail

String detail attributes to edit.

Primitives

String primitive attributes to edit.

Points

String point attributes to edit.

Vertices

String vertex attributes to edit.

Editor

Number of Filters

This SOP can have any number of search/replace patterns, called filters. This parameter shows how many filters have been created. Clicking the or buttons will add more filters, or remove existing ones. By default, a single filter is added when the SOP is created, and starts at number 0. Subsequent filters will be named Filter 1, Filter 2, etc.

Filter x

Disables the filter. If disabled, the particular search/replace pattern will not be run on the given string attributes.

Use Regular Expressions

This will use the extended Perl regular expression syntax to do string replacement, rather than the Houdini pattern replacement syntax. The match and replace is done via Boost Regex.

Global

When this option is on, the From pattern is replaced for each occurrence in the string. When off, only the first occurrence is replaced.

From

The string pattern to rename. See examples above.

To

The replacement pattern for the string. See examples above.

Examples

RandomMaterial Example for Attribute String Edit geometry node

This example demonstrates how to use the Attrib String Edit SOP to modify String primitive attributes and randomize the colours on a grid on a per-primitive basis.

See also

Geometry nodes