| 282 | } |
| 283 | |
| 284 | Parameter input( const Parameter &destination ) const |
| 285 | { |
| 286 | auto destinationIt = m_nodes.find( destination.shader ); |
| 287 | if( destinationIt == m_nodes.end() ) |
| 288 | { |
| 289 | throw IECore::Exception( boost::str( |
| 290 | boost::format( |
| 291 | "Destination shader \"%1%\" not in network" |
| 292 | ) % destination.shader.c_str() |
| 293 | ) ); |
| 294 | } |
| 295 | auto connectionIt = destinationIt->inputConnections.find( destination ); |
| 296 | if( connectionIt == destinationIt->inputConnections.end() ) |
| 297 | { |
| 298 | return Parameter(); |
| 299 | } |
| 300 | return connectionIt->source; |
| 301 | } |
| 302 | |
| 303 | ShaderNetwork::ConnectionRange inputConnections( const IECore::InternedString &handle ) const |
| 304 | { |