@@ -79,7 +79,7 @@ PRM_Default ROP_SceneCacheWriter::fileDefault( 0, "$HIP/output.scc" );
7979PRM_Default ROP_SceneCacheWriter::rootObjectDefault ( 0 , " /obj" );
8080PRM_SpareData ROP_SceneCacheWriter::forceObjectsSpareData;
8181
82- const SceneInterface::Name &ROP_SceneCacheWriter::visibleAttribute ( " scene:visible " );
82+ const SceneInterface::Name &ROP_SceneCacheWriter::changingHierarchyAttribute ( " sceneInterface:changingHierarchy " );
8383
8484OP_TemplatePair *ROP_SceneCacheWriter::buildParameters ()
8585{
@@ -387,13 +387,14 @@ ROP_RENDER_CODE ROP_SceneCacheWriter::doWrite( const SceneInterface *liveScene,
387387
388388 if ( time != m_startTime )
389389 {
390- outChild->writeAttribute ( visibleAttribute, new BoolData ( false ), time - 1e-6 );
390+ outChild->writeAttribute ( changingHierarchyAttribute, new BoolData ( true ), time );
391+ outChild->writeAttribute ( IECore::SceneInterface::visibilityName, new BoolData ( false ), time - 1e-6 );
391392 }
392393 }
393394
394- if ( outChild->hasAttribute ( visibleAttribute ) )
395+ if ( outChild->hasAttribute ( changingHierarchyAttribute ) )
395396 {
396- outChild->writeAttribute ( visibleAttribute , new BoolData ( true ), time );
397+ outChild->writeAttribute ( IECore::SceneInterface::visibilityName , new BoolData ( true ), time );
397398 }
398399
399400 ROP_RENDER_CODE status = doWrite ( liveChild, outChild, time, progress );
@@ -403,20 +404,21 @@ ROP_RENDER_CODE ROP_SceneCacheWriter::doWrite( const SceneInterface *liveScene,
403404 }
404405 }
405406
406- // turn visibleAttribute off if the child disappears
407+ // turn visibility off if the child disappears
407408 SceneInterface::NameList outChildren;
408409 outScene->childNames ( outChildren );
409410 for ( SceneInterface::NameList::iterator it = outChildren.begin (); it != outChildren.end (); ++it )
410411 {
411412 if ( !liveScene->hasChild ( *it ) )
412413 {
413414 SceneInterfacePtr outChild = outScene->child ( *it );
414- if ( !outChild->hasAttribute ( visibleAttribute ) )
415+ if ( !outChild->hasAttribute ( IECore::SceneInterface::visibilityName ) )
415416 {
416- outChild->writeAttribute ( visibleAttribute , new BoolData ( true ), time - 1e-6 );
417+ outChild->writeAttribute ( IECore::SceneInterface::visibilityName , new BoolData ( true ), time - 1e-6 );
417418 }
418419
419- outChild->writeAttribute ( visibleAttribute, new BoolData ( false ), time );
420+ outChild->writeAttribute ( changingHierarchyAttribute, new BoolData ( true ), time );
421+ outChild->writeAttribute ( IECore::SceneInterface::visibilityName, new BoolData ( false ), time );
420422 }
421423 }
422424
0 commit comments