| 536 | } |
| 537 | |
| 538 | void load( IECore::Object::LoadContextPtr context ) |
| 539 | { |
| 540 | unsigned int v = g_ioVersion; |
| 541 | ConstIndexedIOPtr container = context->container( staticTypeName(), v ); |
| 542 | |
| 543 | ConstIndexedIOPtr shaders = container->subdirectory( "shaders" ); |
| 544 | IndexedIO::EntryIDList handles; |
| 545 | shaders->entryIds( handles, IndexedIO::Directory ); |
| 546 | for( const auto &handle : handles ) |
| 547 | { |
| 548 | ShaderPtr shader = context->load<Shader>( shaders.get(), handle ); |
| 549 | setShader( handle, shader.get() ); |
| 550 | } |
| 551 | |
| 552 | ConstIndexedIOPtr connections = container->subdirectory( "connections" ); |
| 553 | IndexedIO::EntryIDList connectionIndices; |
| 554 | connections->entryIds( connectionIndices ); |
| 555 | for( const auto &connectionIndex : connectionIndices ) |
| 556 | { |
| 557 | InternedString c[4]; |
| 558 | InternedString *cp = c; |
| 559 | connections->read( connectionIndex, cp, 4 ); |
| 560 | addConnection( |
| 561 | Connection( Parameter( cp[0], cp[1] ), Parameter( cp[2], cp[3] ) ) |
| 562 | ); |
| 563 | } |
| 564 | |
| 565 | InternedString o[2]; |
| 566 | InternedString *op = o; |
| 567 | container->read( "output", op, 2 ); |
| 568 | m_output = Parameter( op[0], op[1] ); |
| 569 | } |
| 570 | |
| 571 | void memoryUsage( IECore::Object::MemoryAccumulator &accumulator ) const |
| 572 | { |
nothing calls this directly
no test coverage detected