Skip to content

Commit 3806a51

Browse files
committed
Merge branch 'RB-10.5'
2 parents 1288972 + f497741 commit 3806a51

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

Changes

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ Breaking Changes
2424
- IECoreNuke : Removed.
2525
- Removed support for `IECORE_RTLD_GLOBAL` environment variable.
2626

27-
10.5.x.x (relative to 10.5.15.0)
27+
10.5.x.x (relative to 10.5.15.1)
2828
========
2929

3030

3131

32+
10.5.15.1 (relative to 10.5.15.0)
33+
=========
34+
35+
Fixes
36+
-----
37+
38+
- USDScene : Fixed reading of bounds from prims with `extentsHint` and model `kind` but without UsdGeomModelAPI applied.
39+
3240
10.5.15.0 (relative to 10.5.14.1)
3341
=========
3442

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,8 @@ pxr::UsdAttribute boundAttribute( const pxr::UsdPrim &prim )
627627

628628
if( g_useModelAPIBounds )
629629
{
630-
if( auto modelAPI = pxr::UsdGeomModelAPI( prim ) )
630+
pxr::UsdGeomModelAPI modelAPI( prim );
631+
if( modelAPI || prim.IsModel() )
631632
{
632633
return modelAPI.GetExtentsHintAttr();
633634
}

contrib/IECoreUSD/test/IECoreUSD/USDSceneTest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,11 +4425,18 @@ def testModelBound( self ) :
44254425
pxr.UsdGeom.Xform.Define( stage, "/withoutModelAPI" )
44264426
pxr.UsdGeom.Xform.Define( stage, "/withModelAPI" )
44274427
pxr.UsdGeom.Xform.Define( stage, "/withModelAPIAndExtent" )
4428+
pxr.UsdGeom.Xform.Define( stage, "/withKind" )
4429+
pxr.UsdGeom.Xform.Define( stage, "/withKindAndExtent" )
44284430

44294431
pxr.UsdGeom.ModelAPI.Apply( stage.GetPrimAtPath( "/withModelAPI" ) )
44304432
modelAPI = pxr.UsdGeom.ModelAPI.Apply( stage.GetPrimAtPath( "/withModelAPIAndExtent" ) )
44314433
modelAPI.SetExtentsHint( [ ( 1, 2, 3 ), ( 4, 5, 6 ) ] )
44324434

4435+
stage.GetPrimAtPath( "/withKind" ).SetKind( "group" )
4436+
stage.GetPrimAtPath( "/withKindAndExtent" ).SetKind( "group" )
4437+
modelAPI = pxr.UsdGeom.ModelAPI( stage.GetPrimAtPath( "/withKindAndExtent" ) )
4438+
modelAPI.SetExtentsHint( [ ( 1, 2, 3 ), ( 4, 5, 6 ) ] )
4439+
44334440
stage.GetRootLayer().Save()
44344441
del stage
44354442

@@ -4440,6 +4447,9 @@ def testModelBound( self ) :
44404447
self.assertFalse( root.child( "withModelAPI" ).hasBound() )
44414448
self.assertTrue( root.child( "withModelAPIAndExtent" ).hasBound() )
44424449
self.assertEqual( root.child( "withModelAPIAndExtent" ).readBound( 0 ), imath.Box3d( imath.V3d( 1, 2, 3 ), imath.V3d( 4, 5, 6 ) ) )
4450+
self.assertFalse( root.child( "withKind" ).hasBound() )
4451+
self.assertTrue( root.child( "withKindAndExtent" ).hasBound() )
4452+
self.assertEqual( root.child( "withKindAndExtent" ).readBound( 0 ), imath.Box3d( imath.V3d( 1, 2, 3 ), imath.V3d( 4, 5, 6 ) ) )
44434453

44444454
def testAnimatedModelBound( self ) :
44454455

0 commit comments

Comments
 (0)