From 918de2485d2fc94eb9e014af55b0bab5d38e51b6 Mon Sep 17 00:00:00 2001 From: Yannic Schoof Date: Mon, 9 Jan 2023 11:17:54 -0800 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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. ###########################################################################################