An open API service indexing awesome lists of open source software.

https://github.com/pablode/usdshadeview

usdview plugin for inspecting shading networks
https://github.com/pablode/usdshadeview

materialx openusd qt usd

Last synced: 17 days ago
JSON representation

usdview plugin for inspecting shading networks

Awesome Lists containing this project

README

          

# usdshadeview

A usdview plugin for inspecting UsdShade networks.



## Installation

Copy the `lib` and `plugin` directories into your USD installation directory.

For [Advanced Instructions](#advanced-installation) see below.

## Features

### 1. Node Graphs

usdshadeview visualizes [UsdShade NodeGraphs](https://openusd.org/release/api/class_usd_shade_node_graph.html) and Materials (which are specialized node graphs) in an interactive Qt dialog:



The dialog can be shown by **right clicking** a prim of one of both types, which brings up a new option in the context menu:

The network shown in the dialog has a layout depending on network topology, and node colors are based on the classification (USDA, MaterialX, MDL, OSL, node graph, unknown). Child node graphs can be entered using the "E" button.

It is also possible to **right click** value widgets, which exposes following actions:

In the main graph dialog, the menu bar offers following features:
- _View_ → _Filter Output_: filter nodes and connections to a single output
- _Tools_ → _Bake to Texture_: (only for MaterialX materials) invoke UsdBakeMtlx
- _Tools_ → _Export as Image_: save the scene with a transparent background

**Note:** To display thumbnails for EXRs, the _OpenImageIO_ python package has to be additionally installed.

### 2. Node Def Info

Clicking the "?" button of a node widget opens up the node definition dialog which lists all inputs and outputs with their respective documentation.

The information is only available for nodes registered in the Sdr registry.

### 3. Sdr Node List

A list of all nodes in the Sdr registry can be accessed from the usdview menu bar _Window_ → _Sdr Nodes_ submenu.

Clicking on an entry brings up its node definition dialog.

## Compatibility

I have tested this plugin on Windows and macOS with PySide2 and PySide6, and Python 3.7, 3.9 and 3.11.

It has been verified to be compatible with OpenUSD versions down to v22.11.

## Advanced Installation

The plugin can be used outside of the build tree by setting following environment variables:
* `PYTHONPATH` to include `/lib/python`
* `PXR_PLUGINPATH_NAME` to include `/plugin/usd/usdshadeview/resources`

## License

Apache 2.0