From 97f885b2feeb01dfc8fd840805081e88b286e35b Mon Sep 17 00:00:00 2001 From: John Haddon Date: Mon, 7 Nov 2022 09:35:08 +0000 Subject: [PATCH 1/8] VDBObject : Fix infinite recursion in `isEqualTo()` --- src/IECoreVDB/VDBObject.cpp | 2 +- test/IECoreVDB/VDBObjectTest.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/IECoreVDB/VDBObject.cpp b/src/IECoreVDB/VDBObject.cpp index c96cfea9c2..8a3d8244e0 100644 --- a/src/IECoreVDB/VDBObject.cpp +++ b/src/IECoreVDB/VDBObject.cpp @@ -286,7 +286,7 @@ IECore::CompoundObjectPtr VDBObject::metadata( const std::string &name ) bool VDBObject::isEqualTo( const IECore::Object *other ) const { - if( !IECoreScene::VisibleRenderable::isNotEqualTo( other ) ) + if( !IECoreScene::VisibleRenderable::isEqualTo( other ) ) { return false; } diff --git a/test/IECoreVDB/VDBObjectTest.py b/test/IECoreVDB/VDBObjectTest.py index 7b15fede6e..a43aa316c4 100644 --- a/test/IECoreVDB/VDBObjectTest.py +++ b/test/IECoreVDB/VDBObjectTest.py @@ -260,6 +260,16 @@ def testFilename( self ) : emptyVDB = IECoreVDB.VDBObject() self.assertEqual( emptyVDB.fileName(), "" ) + def testEquality( self ) : + + o = IECoreVDB.VDBObject( os.path.join( self.dataDir, "smoke.vdb" ) ) + self.assertEqual( o, o ) + + o2 = o.copy() + o2.findGrid( "density" ).mapAll( lambda value : value + 1 ) + + self.assertNotEqual( o2, o ) + self.assertEqual( o2, o2 ) if __name__ == "__main__": unittest.main() From 918de2485d2fc94eb9e014af55b0bab5d38e51b6 Mon Sep 17 00:00:00 2001 From: Yannic Schoof Date: Mon, 9 Jan 2023 11:17:54 -0800 Subject: [PATCH 2/8] SceneShapeSubSceneOverride: Remove SceneInterface visibility check In df78cb8f2c76a2cae2f46604cae486946fbbb96c changes were made to the `LiveScene` implementation so that we take into account visibility overrides higher up the hierarchy. This makes the changes introduced in 07b40ee6e2c4c5471e6e26da89384fa2a55974c3 obsolete. In fact a `scene:visibility` value stored in the cache stomps over the visibility determination done by `LiveScene`. --- src/IECoreMaya/SceneShapeSubSceneOverride.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/IECoreMaya/SceneShapeSubSceneOverride.cpp b/src/IECoreMaya/SceneShapeSubSceneOverride.cpp index 7670433c9c..086db9ff27 100644 --- a/src/IECoreMaya/SceneShapeSubSceneOverride.cpp +++ b/src/IECoreMaya/SceneShapeSubSceneOverride.cpp @@ -1418,16 +1418,6 @@ void SceneShapeSubSceneOverride::visitSceneLocations( const SceneInterface *scen return; } - // respect visibility attribute - if( sceneInterface->hasAttribute( SceneInterface::visibilityName ) ) - { - ConstBoolDataPtr vis = runTimeCast( sceneInterface->readAttribute( SceneInterface::visibilityName, m_time ) ); - if( vis && !vis->readable() ) - { - return; - } - } - MMatrix accumulatedMatrix; if( !isRoot ) { From 80347b83c79f44d66b865193817e8c0663d0ca79 Mon Sep 17 00:00:00 2001 From: Yannic Schoof Date: Mon, 9 Jan 2023 11:19:02 -0800 Subject: [PATCH 3/8] SceneShapeSubSceneOverride: Check visibility for root locations In case we have a root location i.e. we set a shape node to `objectOnly` and we also set "draw root bounds", the visibility of the current instance was never taken into accout and we draw the bounds regardless. We address this and skip adding a render item for every instance that is set to invisible. --- src/IECoreMaya/SceneShapeSubSceneOverride.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IECoreMaya/SceneShapeSubSceneOverride.cpp b/src/IECoreMaya/SceneShapeSubSceneOverride.cpp index 086db9ff27..4df30a6c19 100644 --- a/src/IECoreMaya/SceneShapeSubSceneOverride.cpp +++ b/src/IECoreMaya/SceneShapeSubSceneOverride.cpp @@ -1463,6 +1463,10 @@ void SceneShapeSubSceneOverride::visitSceneLocations( const SceneInterface *scen int count = 0; for( const auto &instance : m_instances ) { + if ( !instance.visible ) + { + continue; + } std::string instanceName = rootItemName + "_" + std::to_string( count++ ); MString itemName( instanceName.c_str() ); MRenderItem *renderItem = acquireRenderItem( container, IECore::NullObject::defaultNullObject(), instance, relativeLocation, bound, itemName, RenderStyle::BoundingBox ); From 8ea0d550da2e8158cb23b694ddd2be40a89a14e2 Mon Sep 17 00:00:00 2001 From: Ivan Imanishi Date: Thu, 12 Jan 2023 13:48:48 -0300 Subject: [PATCH 4/8] Update Changes --- Changes | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Changes b/Changes index d7ba0d94ca..31accf09a3 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,13 @@ +10.3.8.1 (relative to 10.3.8.0) +======== + +Fixes +--- + +- IECoreMaya.SceneShapeSubSceneOverride : Visibility override fixes (#1320). + - Removed SceneInterface visibility check, as it is now obsolete and causing issues. + - Check visibility for root locations, so bounds aren't incorrectly drawn. + 10.3.8.0 (relative to 10.3.7.2) ======== From 10d6dd824a332b5d80bd8edeaaaf299eae59a8dd Mon Sep 17 00:00:00 2001 From: Ivan Imanishi Date: Thu, 12 Jan 2023 13:49:37 -0300 Subject: [PATCH 5/8] SConstruct : Bumped to 10.3.8.1 --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 69aeda27b0..840b2c90b6 100644 --- a/SConstruct +++ b/SConstruct @@ -57,7 +57,7 @@ SConsignFile() ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below ieCoreMajorVersion = 3 # backwards-incompatible changes ieCoreMinorVersion = 8 # new backwards-compatible features -ieCorePatchVersion = 0 # bug fixes +ieCorePatchVersion = 1 # bug fixes ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc. ########################################################################################### From e10cfbbbe9291682c1554ae97275ec36376aba95 Mon Sep 17 00:00:00 2001 From: Ivan Imanishi Date: Thu, 12 Jan 2023 14:01:11 -0300 Subject: [PATCH 6/8] Changes : Bumped to 10.4.3.1 --- Changes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changes b/Changes index 7fb1a42534..298cc45c29 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +10.4.3.1 (relative to 10.4.3.0) +======== + Fixes --- From 672beb802d4b710d6931edc6b5e5bf38af624c87 Mon Sep 17 00:00:00 2001 From: Ivan Imanishi Date: Thu, 12 Jan 2023 14:01:36 -0300 Subject: [PATCH 7/8] SConstruct : Bumped to 10.4.3.1 --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 0b0a517c43..9a2e455ac4 100644 --- a/SConstruct +++ b/SConstruct @@ -57,7 +57,7 @@ SConsignFile() ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below ieCoreMajorVersion = 4 # backwards-incompatible changes ieCoreMinorVersion = 3 # new backwards-compatible features -ieCorePatchVersion = 0 # bug fixes +ieCorePatchVersion = 1 # bug fixes ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc. ########################################################################################### From a299df46748926e16ce6d0686e568a61467c7ccf Mon Sep 17 00:00:00 2001 From: Ivan Imanishi Date: Thu, 12 Jan 2023 14:07:13 -0300 Subject: [PATCH 8/8] Changes : Added changes for #1314 --- Changes | 1 + 1 file changed, 1 insertion(+) diff --git a/Changes b/Changes index 298cc45c29..feddf8b6de 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,7 @@ Fixes - IECoreMaya.SceneShapeSubSceneOverride : Visibility override fixes (#1320). - Removed SceneInterface visibility check, as it is now obsolete and causing issues. - Check visibility for root locations, so bounds aren't incorrectly drawn. +- VDBObject : Fixed infinite recursion in isEqualTo() (#1314). 10.4.3.0 (relative to 10.4.2.1) ========