This is called whenever a param is changed by the plugin so that the recursive instanceChangedAction will be fed the correct renderScale
| 436 | /// the recursive instanceChangedAction will be fed the correct |
| 437 | /// renderScale |
| 438 | void |
| 439 | OfxImageEffectInstance::getRenderScaleRecursive(double &x, |
| 440 | double &y) const |
| 441 | { |
| 442 | assert( getOfxEffectInstance() ); |
| 443 | std::list<ViewerInstance*> attachedViewers; |
| 444 | getOfxEffectInstance()->getNode()->hasViewersConnected(&attachedViewers); |
| 445 | ///get the render scale of the 1st viewer |
| 446 | if ( !attachedViewers.empty() ) { |
| 447 | ViewerInstance* first = attachedViewers.front(); |
| 448 | int mipMapLevel = first->getMipMapLevel(); |
| 449 | x = Image::getScaleFromMipMapLevel( (unsigned int)mipMapLevel ); |
| 450 | y = x; |
| 451 | } else { |
| 452 | x = 1.; |
| 453 | y = 1.; |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | OfxStatus |
| 458 | OfxImageEffectInstance::getViewCount(int *nViews) const |
no test coverage detected