MaterialX icon indicating copy to clipboard operation
MaterialX copied to clipboard

Add file image preview for Graph Editor

Open kwokcb opened this issue 3 months ago • 2 comments

Feature Update

For better user feedback on what images are being used from the UI, this change adds image previews for file image nodes

Details:

  • Adds a per filename input image preview
  • Default size is 256 px but is settable from the command line using the --previewWidth argument. A size of <= 0 will turn off previews.
  • Preview size will resize to fit up to the maximum property editor panel width if desired preview size is greater than the editor width.

Implementation notes

  • Adds fix to use document "resolved" image path otherwise relative path images may not be found (e.g. std surface brick)

Caveats

  • There is no software (C++) color management support to display images in the input color space.

Examples

  • Image node (resizing)
Resized to fit Full preview size
image image
2nd Image node Usd Texture
image image
gltf Texture tri-planar
image image

kwokcb avatar Dec 03 '25 22:12 kwokcb

This is another port from my editor. For now there is no way to support colorspace transforms via C++ thus images do not consider input space. Let me know what you think. Thanks.

kwokcb avatar Dec 03 '25 22:12 kwokcb

This looks like a great contribution, thanks @kwokcb, and I'm CC'ing @lfl-eholthouser for a more formal review!

jstone-lucasfilm avatar Dec 04 '25 01:12 jstone-lucasfilm