From a501ebe64fb0bb13a881b33ee5311c40288f9ff3 Mon Sep 17 00:00:00 2001 From: Eric Haines Date: Thu, 11 Jan 2024 16:52:31 -0500 Subject: [PATCH] Add UI limits for useSpecularWorkflow and normal in UsdPreviewSurface (#1646) UsdPreviewSurface allows useSpecularWorkflow to be 0 or 1. Normals should have values between -1 to 1, inclusive. This PR puts these limits into place. --- javascript/README.md | 2 +- javascript/build_javascript_win.bat | 3 +++ libraries/bxdf/usd_preview_surface.mtlx | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/javascript/README.md b/javascript/README.md index 38d1734392..bed7e0bcda 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -34,7 +34,7 @@ mkdir ./javascript/build cd ./javascript/build ``` -If you are using the emsdk directly on Windows, note that the emscripten SDK doesn't work with Microsoft's Visual Studio build tools. You need to use an alternative CMake generator like [MinGW](http://mingw-w64.org/doku.php) Makefiles or [Ninja](https://ninja-build.org/). We recommend to use Ninja (unless you already have MinGW installed), since it's pretty lightweight and a pure build system, instead of a full compiler suite. +If you are using the emsdk directly on Windows, note that the emscripten SDK doesn't work with Microsoft's Visual Studio build tools. You need to use an alternative CMake generator like [MinGW](http://mingw-w64.org/doku.php) Makefiles or [Ninja](https://ninja-build.org/). We recommend to use Ninja (unless you already have MinGW installed), since it's pretty lightweight and a pure build system, instead of a full compiler suite. Download Ninja for Windows and unzip the ninja.exe file to some suitable directory in your path (use the command "echo $PATH" or similar to view your PATH variable). Generate the build files with CMake. When building the JavaScript bindings, you can optionally specify the emsdk path with the `MATERIALX_EMSDK_PATH` option. This option can be omitted if the `emsdk/emsdk_env.sh` script was run beforehand. ```sh diff --git a/javascript/build_javascript_win.bat b/javascript/build_javascript_win.bat index 8b08c26600..d62f05f84a 100644 --- a/javascript/build_javascript_win.bat +++ b/javascript/build_javascript_win.bat @@ -1,5 +1,8 @@ +@rem This script builds MaterialX JavaScript on Windows. The final command starts a local server, allowing you to +@rem run the MaterialX Web Viewer locally by entering 'http://localhost:8080' in the search bar of your browser. @echo --------------------- Setup Emscripten --------------------- @echo on +@rem Edit the following paths to match your local locations for the Emscripten and MaterialX projects. set EMSDK_LOCATION=C:/GitHub/emsdk set MATERIALX_LOCATION=C:/GitHub/MaterialX call %EMSDK_LOCATION%/emsdk.bat install latest diff --git a/libraries/bxdf/usd_preview_surface.mtlx b/libraries/bxdf/usd_preview_surface.mtlx index 984bad0326..6efb288184 100644 --- a/libraries/bxdf/usd_preview_surface.mtlx +++ b/libraries/bxdf/usd_preview_surface.mtlx @@ -9,7 +9,7 @@ - + @@ -18,7 +18,7 @@ - +