Esempio n. 1
0
void
DiskCacheNode::getFrameRange(double *first,
                             double *last)
{
    int idx = _imp->frameRange.lock()->getValue();

    switch (idx) {
    case 0: {
        EffectInstancePtr input = getInput(0);
        if (input) {
            input->getFrameRange_public(0, first, last);
        }
        break;
    }
    case 1: {
        getApp()->getFrameRange(first, last);
        break;
    }
    case 2: {
        *first = _imp->firstFrame.lock()->getValue();
        *last = _imp->lastFrame.lock()->getValue();
    };
    default:
        break;
    }
}
Esempio n. 2
0
ActionRetCodeEnum
DiskCacheNode::getFrameRange(double *first,
                             double *last)
{
    int idx = _imp->frameRange.lock()->getValue();

    switch (idx) {
    case 0: {
        EffectInstancePtr input = getInputRenderEffectAtAnyTimeView(0);
        if (input) {

            GetFrameRangeResultsPtr results;
            ActionRetCodeEnum stat = input->getFrameRange_public(&results);
            if (isFailureRetCode(stat)) {
                return stat;
            }
            RangeD range;
            results->getFrameRangeResults(&range);
            *first = range.min;
            *last = range.max;

        }
        break;
    }
    case 1: {
        TimeValue left, right;
        getApp()->getProject()->getFrameRange(&left, &right);
        *first = left;
        *last = right;
        break;
    }
    case 2: {
        *first = _imp->firstFrame.lock()->getValue();
        *last = _imp->lastFrame.lock()->getValue();
    };
    default:
        break;
    }
    return eActionStatusOK;
}