Skip to content

Commit 2d8c179

Browse files
authored
Merge pull request #1320 from yannci/ieVisibility
Visibility override fixes
2 parents 13082dc + 80347b8 commit 2d8c179

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/IECoreMaya/SceneShapeSubSceneOverride.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,16 +1418,6 @@ void SceneShapeSubSceneOverride::visitSceneLocations( const SceneInterface *scen
14181418
return;
14191419
}
14201420

1421-
// respect visibility attribute
1422-
if( sceneInterface->hasAttribute( SceneInterface::visibilityName ) )
1423-
{
1424-
ConstBoolDataPtr vis = runTimeCast<const BoolData>( sceneInterface->readAttribute( SceneInterface::visibilityName, m_time ) );
1425-
if( vis && !vis->readable() )
1426-
{
1427-
return;
1428-
}
1429-
}
1430-
14311421
MMatrix accumulatedMatrix;
14321422
if( !isRoot )
14331423
{
@@ -1473,6 +1463,10 @@ void SceneShapeSubSceneOverride::visitSceneLocations( const SceneInterface *scen
14731463
int count = 0;
14741464
for( const auto &instance : m_instances )
14751465
{
1466+
if ( !instance.visible )
1467+
{
1468+
continue;
1469+
}
14761470
std::string instanceName = rootItemName + "_" + std::to_string( count++ );
14771471
MString itemName( instanceName.c_str() );
14781472
MRenderItem *renderItem = acquireRenderItem( container, IECore::NullObject::defaultNullObject(), instance, relativeLocation, bound, itemName, RenderStyle::BoundingBox );

0 commit comments

Comments
 (0)