| 637 | } |
| 638 | |
| 639 | ConstObjectPtr LinkedScene::readAttribute( const Name &name, double time ) const |
| 640 | { |
| 641 | if ( m_linkedScene && !m_atLink ) |
| 642 | { |
| 643 | if ( m_timeRemapped ) |
| 644 | { |
| 645 | time = remappedLinkTime( time ); |
| 646 | } |
| 647 | return m_linkedScene->readAttribute(name,time); |
| 648 | } |
| 649 | else |
| 650 | { |
| 651 | if( name == timeLinkAttribute && !m_mainScene->hasAttribute( timeLinkAttribute ) ) |
| 652 | { |
| 653 | return new DoubleData( time ); |
| 654 | } |
| 655 | if( name == fileNameLinkAttribute ) |
| 656 | { |
| 657 | ConstStringDataPtr pathData = runTimeCast< const StringData >( m_mainScene->readAttribute( name, 0 ) ); |
| 658 | boost::filesystem::path nativePath( pathData->readable() ); |
| 659 | return new StringData( nativePath.make_preferred().string() ); |
| 660 | } |
| 661 | return m_mainScene->readAttribute(name,time); |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | void LinkedScene::writeAttribute( const Name &name, const Object *attribute, double time ) |
| 666 | { |