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

Method create

contrib/IECoreAlembic/src/IECoreAlembic/ObjectReader.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::unique_ptr<ObjectReader> ObjectReader::create( const Alembic::Abc::IObject &object, IECore::TypeId cortexType )
52{
53 const Alembic::Abc::MetaData &md = object.getMetaData();
54 for( const auto &r : registrations() )
55 {
56 const bool resultTypeMatches = cortexType == IECore::InvalidTypeId || cortexType == r.resultType || RunTimeTyped::inheritsFrom( r.resultType, cortexType );
57 if( resultTypeMatches && r.matcher( md, Alembic::Abc::kStrictMatching ) )
58 {
59 return r.creator( object );
60 }
61 }
62 return nullptr;
63}
64
65
66void ObjectReader::registerReader( MatchFn matcher, IECore::TypeId resultType, Creator creator )

Callers 15

testConstructionMethod · 0.45
testHierarchyMethod · 0.45
testStaticSceneHashesMethod · 0.45
testHasObjectMethod · 0.45
testConvertMeshMethod · 0.45
testReadCurvesMethod · 0.45
testReadPointsMethod · 0.45
testBoundMethod · 0.45
testTransformMethod · 0.45

Calls 1

inheritsFromFunction · 0.85

Tested by 15

testConstructionMethod · 0.36
testHierarchyMethod · 0.36
testStaticSceneHashesMethod · 0.36
testHasObjectMethod · 0.36
testConvertMeshMethod · 0.36
testReadCurvesMethod · 0.36
testReadPointsMethod · 0.36
testBoundMethod · 0.36
testTransformMethod · 0.36