MCPcopy Create free account
hub / github.com/ImageEngine/cortex / readAttribute

Method readAttribute

src/IECoreScene/LinkedScene.cpp:639–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639ConstObjectPtr 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
665void LinkedScene::writeAttribute( const Name &name, const Object *attribute, double time )
666{

Callers 15

testDeprecatedSplinesMethod · 0.45
testCopyReturnValuesMethod · 0.45
testFilteringMethod · 0.45
testWritingMethod · 0.45
testTimeRemappingMethod · 0.45

Calls 2

readableMethod · 0.80
hasAttributeMethod · 0.45