Skip to content

Commit 80347b8

Browse files
committed
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.
1 parent 918de24 commit 80347b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/IECoreMaya/SceneShapeSubSceneOverride.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,10 @@ void SceneShapeSubSceneOverride::visitSceneLocations( const SceneInterface *scen
14631463
int count = 0;
14641464
for( const auto &instance : m_instances )
14651465
{
1466+
if ( !instance.visible )
1467+
{
1468+
continue;
1469+
}
14661470
std::string instanceName = rootItemName + "_" + std::to_string( count++ );
14671471
MString itemName( instanceName.c_str() );
14681472
MRenderItem *renderItem = acquireRenderItem( container, IECore::NullObject::defaultNullObject(), instance, relativeLocation, bound, itemName, RenderStyle::BoundingBox );

0 commit comments

Comments
 (0)