Views (Inspecting / Authoring)

The grill.views package provides Qt widgets to author and inspect USD content.

Convenience launchers and menus for USDView, Houdini and Maya are provided (appearing under the 👨‍🍳 Grill menu), but any DCC or environment with USD and PySide(2|6) should be able to use the widgets.

Spreadsheet Editor

Tabular representation of a Stage to quickly inspect and edit Prims in bulk.

Copy pasting functionality like in other spreadsheet applications should be possible (via csv clipboards).

_images/sheet_usdview.gif
https://user-images.githubusercontent.com/8294116/99145748-57e57380-26c5-11eb-847f-ea01f023caf0.gif
https://user-images.githubusercontent.com/8294116/115137690-e0987f00-a06a-11eb-9ba3-1e7df3c0163c.gif

Connections Viewer

From a given Prim, recursively traverse its Connections through UsdShadeConnectableAPI.

Every node represents a Prim with its name at the top, and each of its Inputs (dark blue if connected, otherwise light blue) and Outputs (red) below.

_images/connections_viewer_usdview.gif
_images/connections_viewer_hou.jpg
_images/connections_viewer_maya.jpg

Prim Composition

Uses Prim Index and its utilities (PcpPrimIndex::DumpToDotGraph(), PcpPrimIndex::DumpToString()) to help inspect Composition Arcs beyond what is possible by default in usdview.

To visualize the Composition graph, the graphviz library needs to be available in the environment.

Important

If you experience crashes when launching this widget, it could be due to issues with QtWebEngine. Try setting environment variable GRILL_SVG_VIEW_AS_PIXMAP=1 to avoid use of QtWebEngine (see environment variables for more details).

_images/prim_composition_usdview.gif
https://user-images.githubusercontent.com/8294116/223416152-d7c456d1-6995-48e4-93e0-a89f89200d4e.gif
_images/prim_composition_maya.gif

Setting an Edit Target

The Prim Composition tree exposes a context menu with a Set as Edit Target item. This redirects edits under the selected arc by setting the current stage’s EditTarget.

In the examples below, prims under ChairB_2 and CheerioA_164 have their displayColor, doc and active properties modified in USDView, Houdini and Maya respectively, and changes are inspected via the Layer Content Browser view.

  1. The References arc targeting the Chair.geom.usd Layer is set as EditTarget.

    When displayColor is modified, the changes are visible on both ChairB_1 and ChairB_2, since they share that arc.

  2. The local arc targeting the local root Kitchen_set.usd layer is set as EditTarget.

    Once the displayColor is modified, the changes are visible on ChairB_2 only, since nothing else shares that arc.

https://user-images.githubusercontent.com/8294116/156912114-a24b81f4-63b1-4b62-9d84-9e2c07aaef5c.gif
  1. The Payload arc targeting the Cheerio_payload.usd layer is set as EditTarget.

    When doc of the CheerioA_164 prim is modified, the changes are visible on all CheerioA_* prims, since they share the composition arc and the layer being modified.

  2. The local arc arc targeting the anonymous houdini LOP layer from the Root LayerStack is set as EditTarget.

    Once the doc is modified, the changes are visible on CheerioA_164 only, since nothing else shares that arc.

https://user-images.githubusercontent.com/8294116/158165374-fe42d80e-8d32-48a4-a628-f6255b5a9e55.gif
  1. The Payload arc targeting the Chair_payload.usd layer is set as EditTarget.

    When the active property is modified, the changes are visible on both ChairB_1 and ChairB_2, since they share the composition arc and the layer being modified.

  2. The local arc targeting the Kitchen_set.usd layer in the Root LayerStack is set as EditTarget.

    Once the active property is modified, the changes are visible on ChairB_2 only, since nothing else shares that arc.

https://user-images.githubusercontent.com/8294116/158165402-c1dd5119-fe78-4332-8ded-1495703345f9.gif

Layer Stack Composition

Similar to Prim Composition, but available for the whole Stage or multiple Prims at once. This helps answer questions like:

_images/layerstack_composition_usdview.gif
https://user-images.githubusercontent.com/8294116/131242061-a42c2637-b550-4e1f-89e5-2328f8491333.gif
https://user-images.githubusercontent.com/8294116/131242058-68f20283-0894-463b-9af0-914941356f8c.gif

In the above example, we’re inspecting Animal Logic’s USD ALab.

  1. On the upper left, all used layers in the composition of the inspected Stage or Prims are listed.

  2. On the upper right, all Prims that are affected by the current selected Layers are listed.

  3. On the bottom, a Composition Arcs graph is displayed for the selected Layers plus the neighbors (predecessors and successors) for each of their LayerStacks.

    • Nodes in the network represent LayerStacks.

    • Edges are the Composition Arcs between them (it follows the same color scheme as the ones provided by PcpPrimIndex::DumpToDotGraph()).

    • Options to filter Composition Arcs are provided above the network view.

      _images/layerstack_composition_arc_filter_options.png
    • The additional option Precise Source Layer (off by default) exists to draw the edge source from the layer from the stack that introduces it. This allows to go from this:

      _images/layerstack_composition_options_default.png

      To (note the outputs of books_magazines01_surfacing and books_magazines01_modelling):

      _images/layerstack_composition_options_precise_source_layer.png

Warning

Time for computing this graph increases with stage complexity. So for larger stages, it is recommended to start the widget with the Prims of interest rather than the complete Stage:

https://user-images.githubusercontent.com/8294116/131242428-7b06729d-f96e-4b92-b02f-1608e99859bd.gif

Layer Content Browser

Uses sdffilter and usdtree to display content from USD layers (regardless of format or if they have been saved on disk).

Array attributes and time samples have their contents reduced to a maximum of 6 entries.

https://user-images.githubusercontent.com/8294116/231415967-c960d036-05e6-42d3-905f-d673f8cf2579.gif

The browser can be opened from USDView’s Composition tab (as shown above), as well as from the Layer Stack Composition’s layer tree:

https://user-images.githubusercontent.com/8294116/156912110-a573d9a6-6aed-4b8a-b492-dbaad2613283.gif

Images from formats supported by Qt through QtGui.QImageReader.supportedImageFormats will also be displayed:

_images/layer_content_browser_image_tab_update.gif

Environment Variables

The Grill defaults to an interactive graph explorer for views like the ConnectionViewer, LayerStack Composition and Taxonomy Editor. Previously, these views used to load static SVG images, leveraging QtWebEngine for performance. However, some environments do not bring QtWebEngine with them, and others lead to crashes (see thegrill#36 as an example).

In order to help with these issues and to bring interactivity to graph views, thegrill#35 introduced a custom GraphView inheriting from QGraphicsView.

When needed, the following environment variables will bring the old SVG behavior and prevent QtWebEngine crashes:

GRILL_GRAPH_VIEW_VIA_SVG

Enable this with a boolean value to inspect graphs as SVG images. A value of 0 will restore the default interactive GraphViewer:

_images/connections_viewer_interactive.jpg
_images/layerstack_composition_interactive.jpg
_images/connections_viewer_svg.jpg
_images/layerstack_composition_svg.jpg

If you come across any reason to inspect images as SVG, please reach out on GitHub as this will help assess if this should be removed or better integrated beyond an environment variable.

GRILL_SVG_VIEW_AS_PIXMAP

Enable this with a boolean value to load SVG images as QPixmap (thus avoiding use of QtWebEngine):

_images/prim_composition_svg.jpg
_images/prim_composition_pixmap.jpg