CVS dif for first method of fixing: Index: Rendering/vtkAssembly.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Rendering/vtkAssembly.cxx,v retrieving revision 1.57 diff -u -r1.57 vtkAssembly.cxx --- Rendering/vtkAssembly.cxx 4 Jan 2005 20:56:39 -0000 1.57 +++ Rendering/vtkAssembly.cxx 2 Jun 2006 12:31:48 -0000 @@ -99,8 +99,29 @@ vtkCollectionSimpleIterator sit; for ( this->Paths->InitTraversal(sit); (path = this->Paths->GetNextPath(sit)); ) { + +//DCS fix visibility so that vtkAssembly turns off children +// + vtkAssemblyNode *tNode; + bool tVisibility = true; + + for(path->InitTraversal(); tNode = path->GetNextNode();) { + + vtkProp3D *tProp = (vtkProp3D *) tNode->GetViewProp(); + + if(!tProp->GetVisibility()) { + tVisibility = false; + break; + } + } +//DCS + prop3D = (vtkProp3D *)path->GetLastNode()->GetViewProp(); - if ( prop3D->GetVisibility() ) + +//DCS +// if ( prop3D->GetVisibility() ) + if (tVisibility) +//DCS prop3D->SetAllocatedRenderTime(fraction, ren); prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); @@ -138,8 +159,29 @@ vtkCollectionSimpleIterator sit; for ( this->Paths->InitTraversal(sit); (path = this->Paths->GetNextPath(sit)); ) { + +//DCS fix visibility so that vtkAssembly turns off children +// + vtkAssemblyNode *tNode; + bool tVisibility = true; + + for(path->InitTraversal(); tNode = path->GetNextNode();) { + + vtkProp3D *tProp = (vtkProp3D *) tNode->GetViewProp(); + + if(!tProp->GetVisibility()) { + tVisibility = false; + break; + } + } +//DCS + prop3D = (vtkProp3D *)path->GetLastNode()->GetViewProp(); - if ( prop3D->GetVisibility() ) + +//DCS +// if ( prop3D->GetVisibility() ) + if (tVisibility) +//DCS { prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); prop3D->SetAllocatedRenderTime(fraction, ren); CVS dif for second method of fixing: Index: Rendering/vtkAssembly.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Rendering/vtkAssembly.cxx,v retrieving revision 1.57 diff -u -r1.57 vtkAssembly.cxx --- Rendering/vtkAssembly.cxx 4 Jan 2005 20:56:39 -0000 1.57 +++ Rendering/vtkAssembly.cxx 2 Jun 2006 12:35:22 -0000 @@ -279,14 +283,18 @@ for ( this->Parts->InitTraversal(pit); (prop3D = this->Parts->GetNextProp3D(pit)); ) { - path->AddNode(prop3D,prop3D->GetMatrix()); + // only add in props which have visible parents + if ( prop3D->GetVisibility() ) + { + path->AddNode(prop3D,prop3D->GetMatrix()); - // dive into the hierarchy - prop3D->BuildPaths(paths,path); + // dive into the hierarchy + prop3D->BuildPaths(paths,path); - // when returned, pop the last node off of the - // current path - path->DeleteLastNode(); + // when returned, pop the last node off of the + // current path + path->DeleteLastNode(); + } } }