Skip to content

Commit

Permalink
SConstruct : Call usdGenSchema directly from commandEnv
Browse files Browse the repository at this point in the history
This is a little simpler than using `gaffer env usdGenSchema` and solves an issue where the `gaffer` wrapper didn't exist when calling `gaffer env usdGenSchema` from a clean build.
  • Loading branch information
murraystevenson committed May 2, 2024
1 parent 3cbfe9d commit efd17ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ API

- SceneAlgo : Added mechanism for scoping render adaptors to specific clients and/or renderers.

Build
-----

- Fixed issue where `gaffer` wrapper may not exist when calling `usdGenSchema` from a clean build.

1.4.2.0 (relative to 1.4.1.0)
=======

Expand Down
8 changes: 3 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ elif commandEnv["PLATFORM"] == "win32" :
else:
commandEnv["ENV"]["LD_LIBRARY_PATH"] = commandEnv.subst( ":".join( [ "$BUILD_DIR/lib" ] + split( commandEnv["LOCATE_DEPENDENCY_LIBPATH"] ) ) )

commandEnv["ENV"]["PYTHONPATH"] = commandEnv.subst( os.path.pathsep.join( split( commandEnv["LOCATE_DEPENDENCY_PYTHONPATH"] ) ) )
commandEnv["ENV"]["PYTHONPATH"] = commandEnv.subst( os.path.pathsep.join( [ "$BUILD_DIR/python" ] + split( commandEnv["LOCATE_DEPENDENCY_PYTHONPATH"] ) ) )

# SIP on MacOS prevents DYLD_LIBRARY_PATH being passed down so we make sure
# we also pass through to gaffer the other base vars it uses to populate paths
Expand Down Expand Up @@ -1861,12 +1861,10 @@ for libraryName, libraryDef in libraries.items() :

subprocess.check_call(
[
shutil.which( "gaffer.cmd" if sys.platform == "win32" else "gaffer", path = env["ENV"]["PATH"] ),
"env",
"usdGenSchema.cmd" if sys.platform == "win32" else "usdGenSchema",
shutil.which( "usdGenSchema.cmd" if sys.platform == "win32" else "usdGenSchema", path = commandEnv["ENV"]["PATH"] ),
str( source[0] ), targetDir
],
env = env["ENV"]
env = commandEnv["ENV"]
)

schemaSource = os.path.join( "usdSchemas", libraryName + ".usda" )
Expand Down

0 comments on commit efd17ee

Please sign in to comment.