|On this page|
Because USD only allows non-destructive edits, the two methods to “remove” something from the scene are to hide it or deactivate it.
Deactivated prims and their children will not be traversed or processed by USD functions or LOP nodes. Children of deactivated primitives don’t appear in the Scene Graph Tree.
Hidden prims their descendants and are still processed by USD functions and LOP nodes, but are not shown in the viewport or rendered.
You can write an override of the activation/visibility data of a prim into the active layer, so when it is composed with the lower layers, in the output stage the prim is deactivated or invisible.
For example, the lighting department might deactivate scratch lighting from a layer they receive from the layout department.
You can see the visibility and activation state of prims in the scene graph tree pane.
Use the “Target Rules” multi-parm to select primitives using various methods. Exclude specific primitives from the target primitives using Add exclusions.
Set Method to “Make Invisible” or “Deactivate”, depending how you want to “remove” the selected prims.
Perform an isolate operation by turning on Prun unselected and targeting the primitives that should not be pruned.
Tips and notes
For this node to prune a prim, the prim must pass the “Target Primitives” rules, and then (after the matching set is inverted if Prune unselected is on) it must match the Prune restrictions pattern (if any).
Since the Prune restrictions pattern is applied after the matching set is possibly inverted by the Prune unselected checkbox, you can use it to easily refine the contents of the inverted set. If Prune unselected is off, you may find it easier to simply add another target rule to achieve the same effect.
You can turn on Add exclusions to add rules that subtract primitives from the matching set. This makes it easy to express things such as “prune everything in this branch except these five specific prims”.
Reverses the meaning of the node, so it hides or deactivates prims that are not selected by the rules above.
You can specify multiple rules for what prims to prune. Set the number of include rules, or click the plus and minus buttons to add or remove rules. If Prune unselected is enabled, these primitives are the ones that will not be pruned.
Show another multi-parm for creating exclusion rules. Prims that match the exclude rules are subtracted from the list of prims that match the target rules to get the final set of primitives to prune or keep.
You can specify multiple rules for what prims to exclude. Set the number of exclude rules, or click the plus and minus buttons to add or remove rules.
Sets the “active” metadata on the selected prims to false.
Sets the “visibility” of the selected prims to “hidden”.
When this value is non-zero, the node prunes the matching primitives. If this is
0, the node instead un-prunes the matching primitives, making them explicitly active or visible. This parameter allows you to control the prune/un-prune operation with keyframe animation or an expression (for example, you could prune out the “unfractured” version of an asset at the frame where a fracturing simulation starts). In USD terms, this authors an opinion at each time step about the active/visible property of the primitives.
This parameter is evaluated separately for each primitive that will be modified by this node. you may use the following local variable in this parameter only
The total number of primitives being modified by this node.
Index of the primitive being modified. This value goes from '0' to '@numprim-1'.
The path of the primitive being modified.
This will not affect the visibility of ancestor primitives, so the selected primitives may still not be visible. Use the Configure Primitives node to guarantee the visibility of certain primitives.
This node only works on primitives that match this pattern. This lets you add further refinements to the targeting. For example, you can only affect a portion of the scene graph, or only prune primitives with geometry, or only prune Component kinds.
Prune Point Instances Individually
When pruning a point instancer prim, prune the instances individually instead of the entire instancer at once. This is currently only supported when pruning by bounding box.
Prune Ancestors Automatically
If all children of a primitive are being pruned, that parent primitive is pruned instead of pruning the children individually. This rule is applied recursively. This makes the prune operation much more efficient (at the expense of making it slightly more complicated to re-activate or display one of the pruned children). You should leave this on unless you want to un-prune individual children later.
Prune Class Primitives
Enable this option to allow the Prune LOP to affect class primitives (also known as abstract primitives). This option is disabled by default because normally when pruning parts of a scene, it is the individual prims inheriting from classes that you want to prune. Class primitives themselves are never rendered, so there is little reason to prune them from the scene. However it is sometimes useful to prune class prims as a way of pruning all inheritors of that class.
Creates a USD collection with all the primitives that were modified by this node.
The primitive on which to create the collection. If the specified primitive does not exist, the node will create it.
The name of the collection to create.