.\" Copyright 2024 Apple
.\"
.\" Licensed under the terms set forth in the LICENSE.txt file available at
.\" https://openusd.org/license.
.\"

.ft 1
..

.TH USDTREE
.SH NAME
usdtree - Utility to display the structure of the USD file as a tree in the terminal.
.SH SYNOPSIS
usdtree [inputFiles]
.SH DESCRIPTION
\f[B]usdtree\f[R] traverses the hierarchy in a given USD stage or layer, and displays
the structure.

The default mode inspects the single USD file provided.
Use the --flatten argument to see the flattened composed Stage tree instead.

Special metadata like kind and active are always shown if authored unless --simple is provided.


.TP
\f[V]-h\f[R], \f[V]--help\f[R]
Prints out a help message and exits.

.TP
\f[V]--unloaded\f[R]
Payloads are not loaded when this is specified.

.TP
\f[V]-a\f[R], \f[V]--attributes\f[R]
Display authored attributes.

.TP
\f[V]-m\f[R], \f[V]--metadata\f[R]
Display authored metadata.
Active and Kind are part of the label and not shown as individual items.

.TP
\f[V]-s\f[R], \f[V]--simple\f[R]
Only display prim names: no specifier, kind or active state.

.TP
\f[V]-f\f[R], \f[V]--flatten\f[R]
Compose the stage with the input file as the root layer and write the flattened content.

.TP
\f[V]--flattenLayerStack\f[R]
Flatten the layer stack with the given root layer. Unlike --flatten, this does not flatten composition arcs (such as references).

.TP
\f[V]--mask\f[R] [PRIMPATHS]
Limit stage population to these prims, their descendants and ancestors. To specify multiple paths, 
either use commas with no spaces, or quote the argument and separate paths by commas and/or spaces. Requires --flatten.

.TP
\f[V]--version\f[R]
Display program version information and exits.


.SH EXAMPLES

.TP
\f[V]usdtree input.usdz --attributes --metadata --flatten\f[R]
Displays the structure of the flattened input USDZ, including all attributes and metadata.