MCPcopy Create free account
hub / github.com/NatronGitHub/openfx-misc / getInputAutomatic

Method getInputAutomatic

Switch/Switch.cpp:154–168  ·  view source on GitHub ↗

return the first connected input with a non-empty RoD

Source from the content-addressed store, hash-verified

152
153 // return the first connected input with a non-empty RoD
154 int getInputAutomatic(double time)
155 {
156 unsigned i;
157
158 for (i = 0; i < _srcClip.size(); ++i) {
159 if ( _srcClip[i] && _srcClip[i]->isConnected() ) {
160 OfxRectD rod = _srcClip[i]->getRegionOfDefinition(time);
161 if ( !Coords::rectIsEmpty(rod) ) {
162 return (int)i;
163 }
164 }
165 }
166
167 return 0; // no input
168 }
169
170 // do not need to delete these, the ImageEffect is managing them for us
171 Clip* _dstClip;

Callers

nothing calls this directly

Calls 2

isConnectedMethod · 0.80
getRegionOfDefinitionMethod · 0.45

Tested by

no test coverage detected