Skip to content

Commit

Permalink
Merge branch 'RB-10.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Aug 30, 2024
2 parents 634afb6 + 1be00fb commit e8bc39a
Show file tree
Hide file tree
Showing 34 changed files with 1,240 additions and 181 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,57 +30,73 @@ jobs:
# and then use `include` to define their settings.

name: [
linux-python3,
linux-python3-debug,
windows-python3,
windows-python3-debug
linux-gcc9,
linux-debug-gcc9,
linux-gcc11,
windows,
windows-debug
]

include:

- name: linux-python3
- name: linux-gcc9
os: ubuntu-20.04
buildType: RELEASE
containerImage: ghcr.io/gafferhq/build/build:2.0.0
containerImage: ghcr.io/gafferhq/build/build:2.1.2
options: .github/workflows/main/options.posix
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-linux.tar.gz
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/8.0.1/gafferDependencies-8.0.1-linux-gcc9.tar.gz
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: true

- name: linux-python3-debug
- name: linux-debug-gcc9
os: ubuntu-20.04
buildType: DEBUG
containerImage: ghcr.io/gafferhq/build/build:2.0.0
containerImage: ghcr.io/gafferhq/build/build:2.1.2
options: .github/workflows/main/options.posix
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-linux.tar.gz
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/8.0.1/gafferDependencies-8.0.1-linux-gcc9.tar.gz
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: false

- name: windows-python3
- name: linux-gcc11
os: ubuntu-20.04
buildType: RELEASE
containerImage: ghcr.io/gafferhq/build/build:3.0.0
options: .github/workflows/main/options.posix
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/8.0.1/gafferDependencies-8.0.1-linux-gcc11.tar.gz
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: true

- name: windows
os: windows-2019
buildType: RELEASE
options: .github/workflows/main/options.windows
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-windows.zip
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/8.0.1/gafferDependencies-8.0.1-windows.zip
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: true

- name: windows-python3-debug
- name: windows-debug
os: windows-2019
buildType: RELWITHDEBINFO
options: .github/workflows/main/options.windows
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-windows.zip
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/8.0.1/gafferDependencies-8.0.1-windows.zip
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: false

runs-on: ${{ matrix.os }}

container: ${{ matrix.containerImage }}

env:
# GitHub have moved to running actions on Node20, which prevents them from
# running on CentOS 7. The below allows actions to continue running on Node16
# until October.
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ilammy/msvc-dev-cmd@v1.10.0
- uses: ilammy/msvc-dev-cmd@v1.12.1
with:
sdk: 10.0.17763.0

Expand Down Expand Up @@ -154,7 +170,7 @@ jobs:
- name: Build
run: |
scons -j 2 install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
scons -j 2 BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
# Copy the config log for use in the "Debug Failures" step, because it
# gets clobbered by the `scons test*` call below.
cp config.log buildConfig.log
Expand All @@ -168,10 +184,11 @@ jobs:

- name: Build Package
run: |
scons install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
${{ env.PACKAGE_COMMAND }} ${{ env.CORTEX_BUILD_NAME }}.${{env.PACKAGE_EXTENSION}} ${{ env.CORTEX_BUILD_NAME }}
if: matrix.publish

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: ${{ env.CORTEX_BUILD_NAME }}
path: ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/main/options.posix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ LIBPATH = libs

PYTHON = deps + "/bin/python"

if os.path.exists( deps + "/bin/python3" ) :
pythonABIVersion = "3.7m"
else :
pythonABIVersion = "2.7"
pythonABIVersion = "3.10"

PYTHON_LINK_FLAGS = "-lpython" + pythonABIVersion

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*.lib
*.ilk
*.exp
.sconsign.dblite
.sconsign*.dblite
.sconf_temp
.cproject
.project
Expand Down
78 changes: 77 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,8 +1,84 @@
10.5.x.x (relative to 10.5.6.2)
10.5.x.x (relative to 10.5.9.2)
========




10.5.9.2 (relative to 10.5.9.1)
========

Fixes
-----

- USDScene :
- Fixed round-tripping of colons in set names.
- Fixed `hash()` to consider animation on ModelAPI extents when hashing the bound.
- ToMayaMeshConverter : Reverted #1386 that no longer locked normals set on the Mesh from the scc to fix issues with Maya incorrectly recomputing normals as Vertex normals when they were originally computed as Face normals.
- CurvesAlgo : Fixed `resamplePrimitiveVariables()` for use with periodic curves.

10.5.9.1 (relative to 10.5.9.0)
========

Fixes
-----

- OpenImageIOAlgo : Fixed `data()` handling of arrays of type `TypeDesc::CHAR`, `TypeDesc::UCHAR`, `TypeDesc::USHORT`, `TypeDesc::SHORT`, `TypeDesc::UINT` and `TypeDesc::HALF`. Among other things, this fixes the round-tripping of ICC profiles in ImageReader/ImageWriter.

10.5.9.0 (relative to 10.5.8.0)
========

Improvements
------------

- USDScene : `hasBound()` and `readBound()` now use `UsdGeomModelAPI` extents hints if they are available. This behaviour can be disabled by setting the `IECOREUSD_USE_MODELAPI_BOUNDS` environment variable to a value of `0`.

10.5.8.0 (relative to 10.5.7.1)
========

Improvements
------------

- IECoreUSD::DataAlgo : Added binding for `toUSD()` function.

Fixes
-----

- ShaderNetworkAlgo : Fixed crash caused by cyclic connections in `removeUnusedShaders()`.
- ShaderStateComponent : Fixed GL rendering failures caused by unsupported values for texture parameters.
- USDScene :
- Fixed exceptions caused by attempt to write shader parameters with unsupported value types.
- Fixed duplicate loading of `arnold:*` primvars on lights as attributes. These are now only loaded as parameters on the light shader.
- IECoreUSD::DataAlgo : Fixed exceptions thrown by `toUSD()` and `valueTypeName()` when passed datatypes not supported by `dispatch()`. An empty VtValue or SdfValueTypeName is now returned instead.

Build
-----

- CI : Updated to GafferHQ/dependencies 8.0.1.

10.5.7.1 (relative to 10.5.7.0)
========

Fixes
-----

- USDScene :
- Adding mapping of `arnold:*` light parameters to and from the non-standard `primvars:arnold:*` attributes preferred by the `arnold-usd` project.
- Fixed writing of `treatAsPoint` and `treatAsLine` light parameters, which were being written as generic `inputs:*` attributes and not the specific
attributes defined by the SphereLight and CylinderLight schemas.

10.5.7.0 (relative to 10.5.6.2)
========

Features
--------

- MeshPrimitive : Added `interpolateBoundary`, `faceVaryingLinearInterpolation` and `triangleSubdivisionRule` properties for controlling the shape of the subdivision limit surface.

Fixes
-----

- MeshPrimitive : Removed `interpolation` from topologyHash. The topologyHash should only include things which affect the layout of primitive variables.

10.5.6.2 (relative to 10.5.6.1)
========

Expand Down
5 changes: 3 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SConsignFile()

ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below
ieCoreMajorVersion = 5 # backwards-incompatible changes
ieCoreMinorVersion = 6 # new backwards-compatible features
ieCoreMinorVersion = 9 # new backwards-compatible features
ieCorePatchVersion = 2 # bug fixes
ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc.

Expand Down Expand Up @@ -96,7 +96,7 @@ o.Add(
o.Add(
"CXXFLAGS",
"The extra flags to pass to the C++ compiler during compilation.",
[ "-pipe", "-Wall", "-Wextra" ] if Environment()["PLATFORM"] != "win32" else [ "/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-", "/DBOOST_ALL_NO_LIB" ],
[ "-pipe", "-Wall", "-Wextra", "-Wsuggest-override" ] if Environment()["PLATFORM"] != "win32" else [ "/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-", "/DBOOST_ALL_NO_LIB" ],
)

o.Add(
Expand Down Expand Up @@ -1469,6 +1469,7 @@ if testEnv["PLATFORM"] == "darwin" :
testEnv["ENV"][testEnv["TEST_LIBRARY_PATH_ENV_VAR"]] = os.pathsep.join( [ testEnv["ENV"].get(testEnv["TEST_LIBRARY_PATH_ENV_VAR"], ""), testEnvLibPath ] )
if testEnv["TEST_LIBRARY_PATH_ENV_VAR"] != libraryPathEnvVar :
testEnv["ENV"][libraryPathEnvVar] = os.pathsep.join( [ testEnv["ENV"].get(libraryPathEnvVar, ""), testEnvLibPath ] )
testEnv["ENV"]["IECORE_DLL_DIRECTORIES"] = testEnv["ENV"][libraryPathEnvVar]
testEnv["ENV"]["IECORE_OP_PATHS"] = os.path.join( "test", "IECore", "ops" )

c = configureSharedLibrary( testEnv )
Expand Down
13 changes: 13 additions & 0 deletions contrib/IECoreUSD/src/IECoreUSD/AttributeAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
IECORE_PUSH_DEFAULT_VISIBILITY
#include "pxr/usd/usdGeom/primvar.h"
#include "pxr/usd/usdGeom/primvarsAPI.h"

#include "pxr/usd/usdLux/lightAPI.h"
IECORE_POP_DEFAULT_VISIBILITY

using namespace IECoreUSD;
Expand Down Expand Up @@ -92,6 +94,17 @@ bool IECoreUSD::AttributeAlgo::isCortexAttribute( const pxr::UsdGeomPrimvar &pri
}
}

// Check for `arnold:*` primvars on lights. These will be loaded as
// parameters in `ShaderAlgo::readLight()`.

if(
boost::starts_with( primVar.GetPrimvarName().GetString(), "arnold:" ) &&
pxr::UsdLuxLightAPI( primVar.GetAttr().GetPrim() )
)
{
return false;
}

// Everything else should be loaded as a Cortex attribute.

return true;
Expand Down
20 changes: 18 additions & 2 deletions contrib/IECoreUSD/src/IECoreUSD/DataAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,15 @@ struct VtValueFromData

pxr::VtValue IECoreUSD::DataAlgo::toUSD( const IECore::Data *data, bool arrayRequired )
{
return IECore::dispatch( data, VtValueFromData(), arrayRequired );
try
{
return IECore::dispatch( data, VtValueFromData(), arrayRequired );
}
catch( const IECore::Exception & )
{
// Type not supported by `dispatch()`.
return VtValue();
}
}

pxr::TfToken IECoreUSD::DataAlgo::role( GeometricData::Interpretation interpretation )
Expand Down Expand Up @@ -503,5 +511,13 @@ struct VtValueTypeNameFromData

pxr::SdfValueTypeName IECoreUSD::DataAlgo::valueTypeName( const IECore::Data *data )
{
return IECore::dispatch( data, VtValueTypeNameFromData() );
try
{
return IECore::dispatch( data, VtValueTypeNameFromData() );
}
catch( const IECore::Exception & )
{
// Type not supported by `dispatch()`.
return SdfValueTypeName();
}
}
34 changes: 32 additions & 2 deletions contrib/IECoreUSD/src/IECoreUSD/MeshAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,30 @@ IECore::ObjectPtr readMesh( pxr::UsdGeomMesh &mesh, pxr::UsdTimeCode time, const

if( subdivScheme == pxr::UsdGeomTokens->catmullClark )
{
newMesh->setInterpolation( "catmullClark" );
newMesh->setInterpolation( IECoreScene::MeshPrimitive::interpolationCatmullClark.string() );
}
else if( subdivScheme == pxr::UsdGeomTokens->loop )
{
newMesh->setInterpolation( IECoreScene::MeshPrimitive::interpolationLoop.string() );
}
else
{
// For "none", we currently use the default value of "linear". It would probably be preferrable if
// we used the name "none", since this is different from "bilinear", which would indicate that
// subdivision is being requested, but without altering the shape of the limit surface.
}

pxr::TfToken interpolateBoundary;
mesh.GetInterpolateBoundaryAttr().Get( &interpolateBoundary, time );
newMesh->setInterpolateBoundary( interpolateBoundary.GetString() );

pxr::TfToken faceVaryingLinearInterpolation;
mesh.GetFaceVaryingLinearInterpolationAttr().Get( &faceVaryingLinearInterpolation, time );
newMesh->setFaceVaryingLinearInterpolation( faceVaryingLinearInterpolation.GetString() );

pxr::TfToken triangleSubdivisionRule;
mesh.GetTriangleSubdivisionRuleAttr().Get( &triangleSubdivisionRule, time );
newMesh->setTriangleSubdivisionRule( triangleSubdivisionRule.GetString() );

// Corners

Expand Down Expand Up @@ -170,15 +192,23 @@ bool writeMesh( const IECoreScene::MeshPrimitive *mesh, const pxr::UsdStagePtr &

// Interpolation

if( mesh->interpolation() == std::string( "catmullClark" ) )
if( mesh->interpolation() == IECoreScene::MeshPrimitive::interpolationCatmullClark.string() )
{
usdMesh.CreateSubdivisionSchemeAttr().Set( pxr::UsdGeomTokens->catmullClark );
}
else if( mesh->interpolation() == IECoreScene::MeshPrimitive::interpolationLoop.string() )
{
usdMesh.CreateSubdivisionSchemeAttr().Set( pxr::UsdGeomTokens->loop );
}
else
{
usdMesh.CreateSubdivisionSchemeAttr().Set( pxr::UsdGeomTokens->none );
}

usdMesh.CreateInterpolateBoundaryAttr().Set( pxr::TfToken( mesh->getInterpolateBoundary().string() ), time );
usdMesh.CreateFaceVaryingLinearInterpolationAttr().Set( pxr::TfToken( mesh->getFaceVaryingLinearInterpolation().string() ), time );
usdMesh.CreateTriangleSubdivisionRuleAttr().Set( pxr::TfToken( mesh->getTriangleSubdivisionRule().string() ), time );

// Corners

if( mesh->cornerIds()->readable().size() )
Expand Down
Loading

0 comments on commit e8bc39a

Please sign in to comment.