Beispiel #1
0
WriterPlugin::WriterPlugin( OfxImageEffectHandle handle )
	: ImageEffectGilPlugin( handle )
	, _oneRender( false )
	, _oneRenderAtTime( 0 )
{
	_clipSrc             = fetchClip( kOfxImageEffectSimpleSourceClipName );
	_clipDst             = fetchClip( kOfxImageEffectOutputClipName );
	_paramFilepath       = fetchStringParam( kParamWriterFilename );
	_paramRenderButton   = fetchPushButtonParam( kParamWriterRender );
	_paramRenderAlways   = fetchBooleanParam( kParamWriterRenderAlways );
	_paramBitDepth       = fetchChoiceParam( kParamWriterBitDepth );
	_paramForceNewRender = fetchIntParam( kParamWriterForceNewRender );
	_paramFlip           = fetchBooleanParam( kParamWriterFlip );
	_isSequence          = _filePattern.initFromDetection( _paramFilepath->getValue() );
}
Beispiel #2
0
/*
 * fecth plugin IHM parameters with plugin parameters pointer
 */
HistogramPlugin::HistogramPlugin(OfxImageEffectHandle handle)
    : ImageEffectGilPlugin(handle)
{
    _paramGlobalDisplaySelection = fetchBooleanParam(kGlobalDisplay); // global display

    _paramOverlayRSelection = fetchBooleanParam(kBoolRed);   // R (is channel selected?)
    _paramMutliplierR = fetchDoubleParam(kMultiplierRed);    // R multiplier
    _paramOverlayGSelection = fetchBooleanParam(kBoolGreen); // G (is channel selected?)
    _paramMutliplierG = fetchDoubleParam(kMultiplierGreen);  // G multiplier

    _paramOverlayBSelection = fetchBooleanParam(kBoolBlue); // B (is channel selected?)
    _paramMutliplierB = fetchDoubleParam(kMultiplierBlue);  // B multiplier

    _paramOverlayHSelection = fetchBooleanParam(kBoolHue);        // H (is channel selected?)
    _paramMutliplierH = fetchDoubleParam(kMultiplierHue);         // H multiplier
    _paramOverlaySSelection = fetchBooleanParam(kBoolSaturation); // S (is channel selected?)
    _paramMutliplierS = fetchDoubleParam(kMultiplierSaturation);  // S multiplier

    _paramOverlayLSelection = fetchBooleanParam(kBoolLightness); // L (is channel selected?)
    _paramMutliplierL = fetchDoubleParam(kMultiplierLightness);  // L multiplier

    _paramDisplayTypeSelection =
        fetchChoiceParam(kHistoDisplayListParamLabel); // histogram display list (Histogram overlay group)

    _paramDisplaySelection = fetchBooleanParam(kBoolSelection); // display selection on source clip (Selection group)
    _paramSelectionMode = fetchChoiceParam(kSelectionModeListParamLabel); // selection mode (Selection group)

    _paramSelectionMultiplierSelection = fetchDoubleParam(kselectionMultiplier); // selection multiplier (Advanced group)
    _paramRefreshOverlaySelection = fetchPushButtonParam(kButtonRefreshOverlay); // refresh overlay (Advanced group)
    _paramNbStepSelection = fetchIntParam(knbStepRange);                         // nb step range (Advanced group)

    // Reset param booleans
    _isCleaned = false;
    _isNbStepChanged = false;
    _isHistogramRefresh = false;

    // Initialize scoped pointer
    _overlayDataCount = 0;

    /// @todo: HACK to display curves default position
    OFX::InstanceChangedArgs changed(this->timeLineGetTime());
    changedClip(changed, kOfxImageEffectSimpleSourceClipName);
}
Beispiel #3
0
WriterPlugin::WriterPlugin( OfxImageEffectHandle handle )
	: ImageEffectGilPlugin( handle )
	, _oneRender( false )
	, _oneRenderAtTime( 0 )
	, _isSequence( false )
	, _filePattern()
{
	_clipSrc = fetchClip( kOfxImageEffectSimpleSourceClipName );
	_clipDst = fetchClip( kOfxImageEffectOutputClipName );
	_paramFilepath = fetchStringParam( kTuttlePluginFilename );
	_paramRenderButton = fetchPushButtonParam( kParamWriterRender );
	_paramRenderAlways = fetchBooleanParam( kParamWriterRenderAlways );
	_paramCopyToOutput = fetchBooleanParam( kParamWriterCopyToOutput );
	_paramBitDepth = fetchChoiceParam( kTuttlePluginBitDepth );
	_paramPremult = fetchBooleanParam( kParamPremultiplied );
	_paramExistingFile = fetchChoiceParam( kParamWriterExistingFile );
	_paramForceNewRender = fetchIntParam( kParamWriterForceNewRender );

	// update params
	changedParam( OFX::InstanceChangedArgs(), kTuttlePluginFilename );
}