Skip to content

Commit

Permalink
gaffer.cmd : Set PXR_USD_WINDOWS_DLL_PATH
Browse files Browse the repository at this point in the history
If this variable is set, USD will not add the entries from `PATH` to the
Python binary search paths. We set it to an empty string because the
`Gaffer` module adds the proper binary path and our intention here is
only to prevent USD from adding `PATH` entries.
  • Loading branch information
ericmehl committed Jul 9, 2024
1 parent 33bd2e1 commit de32cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Improvements
- EditScope : Added summaries of set membership edits in the NodeEditor.
- LightEditor : Mute and solo columns now accurately reflect the presence of the `light:mute` attribute (for the Mute column) and membership in the `soloLights` set (for the Solo column) for all scene locations, not just for lights.
- RenderPassEditor : The currently active render pass can now be unset by double clicking on its green dot in the "Active" column.
- Launch : The Windows launch script now sets the `PXR_USD_WINDOWS_DLL_PATH` environment variable to an empty string if it is not already set. This prevents USD from adding all entries from `PATH` to the Python binary search paths and ensures our USD binaries are found instead of potentially other installations.

Fixes
-----
Expand Down
4 changes: 4 additions & 0 deletions bin/gaffer.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ call :prependToPath "%GAFFER_ROOT%\ops" IECORE_OP_PATHS

call :prependToPath "%GAFFER_ROOT%\resources\IECoreUSD" PXR_PLUGINPATH_NAME
call :prependToPath "%GAFFER_ROOT%\materialX" PXR_MTLX_STDLIB_SEARCH_PATHS
rem Prevent USD from adding entries from `PATH` to Python binary search paths.
if "%PXR_USD_WINDOWS_DLL_PATH%" EQU "" (
set PXR_USD_WINDOWS_DLL_PATH=""
)

call :prependToPath "%USERPROFILE%\gaffer\opPresets;%GAFFER_ROOT%\opPresets" IECORE_OP_PRESET_PATHS
call :prependToPath "%USERPROFILE%\gaffer\procedurals;%GAFFER_ROOT%\procedurals" IECORE_PROCEDURAL_PATHS
Expand Down

0 comments on commit de32cce

Please sign in to comment.