Using wildcards and string expressions to find objects by name


From Ciaran on the XSI mailing list, here’s a good example of how to find all light nulls whose names contain “lamp” or “light”:

oLightNulls =  oModel.FindChildren2("{*light*,*lamp*}",c.siNullPrimType)

The curly brackets {} are used in a string expression to specify a list of objects.

That String Expressions page still looks pretty much the same as it did back in 1999, when I first wrote it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s