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

Method frame

src/IECore/StringAlgo.cpp:246–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 }
245
246 int frame() const override
247 {
248 const Data *d = m_variables->member( "frame" );
249 if( !d )
250 {
251 return 1;
252 }
253 switch( d->typeId() )
254 {
255 case IntDataTypeId :
256 return static_cast<const IntData *>( d )->readable();
257 case FloatDataTypeId :
258 return (int)round( static_cast<const FloatData *>( d )->readable() );
259 default :
260 throw IECore::Exception(
261 string( "Unexpected data type \"" ) + d->typeName() +
262 "\" for frame : expected IntData or FloatData"
263 );
264 }
265 }
266
267 const std::string &variable( const boost::string_view &name, bool &recurse ) const override
268 {

Callers 1

substituteInternalFunction · 0.45

Calls 3

typeIdMethod · 0.80
readableMethod · 0.80
typeNameMethod · 0.80

Tested by

no test coverage detected