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 |
All roots |
Specifies the mask pattern to match the prim names to affect. The default mask, All roots, defaults to select the top most level Xforms in your scene graph. You can use standard glob-style variables, such as /*, to create masks or use individual prim names separated by spaces. For example, /GeoCube 1 /GeoCard3 applies the effect to only those prims. All roots - select the top level Xform(s) in your scene. Last modified - selects whatever the last node modified was. All Cameras - selects all Cameras in your scene graph. All Lights - select all lights in your scene graph. All Meshes - selects all meshes in your scene graph. Custom - sets a custom selection of prims that exist in your scene graph. 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.
Note: As of Nuke 16.0, the GeoScope node is now called GeoScopePrim.
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
}