GeoCollection

The GeoCollection node creates a collection attribute on an object. Enter an object, a list of paths and a collection name, and a collection is created on the object containing the paths. This can then be used later on in a path expression as a shortcut to refer to the paths. For example, you might create collections for all the lights or cameras in the scene or any prims that have shadows cast on them.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The previous stage in the scene you want to affect.

Control (UI)

Knob (Scripting)

Default Value

Function

GeoCollection

Mask

mask_patterns

{lastmodified}

Specifies the mask pattern to match the prim names to affect. The default mask, {lastmodified}, adds whatever was changed by the previous node to the collection. A simple way to think of it is that {lastmodified} affects the node above. You can use standard glob-style variables, such as /*, to create masks or use individual prim names separated by spaces. For example, /PointLight1 /SpotLight1_3 adds only those prims.

Tip:  You can also use the cog menu, the Viewer picker, or drag and drop paths from the Scene Graph to create masks.

Collection Name

collection_name

none

Sets the name of the collection to create and authors a collection token in the USD source.

Includes

includes

none

Specifies prims to explicitly include from the collection. For example, //PointLight* adds all PointLights to the collection.

Excludes

excludes

none

Specifies prims to explicitly exclude from the collection. For example, /PointLight1 explicitly excludes PointLight1.

Collection Workflow Example

This simple example creates a cube, duplicates the cube using GeoInstance, and then passes GeoScope and GeoCollection information to a GeoPrune to remove instances of the cube starting with /GeoCube1_3* from the scene.

Copy
Pruning Cube Duplicates by Collection
set cut_paste_input [stack 0]
push $cut_paste_input
GeoCube {
 setAuthorMode {display_color set}
 display_color {1 0.749311 0.020768}
 display_color_panelDropped true
 name GeoCube1
 xpos 195
 ypos -249
}
GeoInstance {
 count 4
 translate {1.889999986 0 0}
 name GeoInstance1
 xpos 195
 ypos -225
}
GeoInstance {
 translate {0 0 1.889999986}
 name GeoInstance2
 xpos 195
 ypos -201
 }
GeoScope {
 prim_path /collections
 name GeoScope2
 xpos 195
 ypos -177
}
GeoCollection {
 mask_patterns /collections
 collection_name cubes
 includes /GeoCube1_3*
 name GeoCollection2
 xpos 195
 ypos -153
}
GeoPrune {
 mask_patterns "%/collections:cubes"
 name GeoPrune2
 xpos 195
 ypos -129
}
Viewer {
 frame_range 1-100
 gl_lighting true
 monitorOutOutputTransform rec709
 name Viewer1
 xpos 195
 ypos -105
}