Beispiel #1
0
PluginPtr
DiskCacheNode::createPlugin()
{
    std::vector<std::string> grouping;
    grouping.push_back(PLUGIN_GROUP_OTHER);
    PluginPtr ret = Plugin::create(DiskCacheNode::create, DiskCacheNode::createRenderClone, PLUGINID_NATRON_DISKCACHE, "DiskCache", 1, 0, grouping);

    QString desc =  tr("This node caches all images of the connected input node onto the disk with full 32bit floating point raw data. "
                       "When an image is found in the cache, %1 will then not request the input branch to render out that image. "
                       "The DiskCache node only caches full images and does not split up the images in chunks.  "
                       "The DiskCache node is useful if working with a large and complex node tree: this allows to break the tree into smaller "
                       "branches and cache any branch that one is no longer working on. The cached images are saved by default in the same directory that is used "
                       "for the viewer cache but you can set its location and size in the preferences. A solid state drive disk is recommended for efficiency of this node. "
                       "By default all images that pass into the node are cached but they depend on the zoom-level of the viewer. For convenience you can cache "
                       "a specific frame range at scale 100% much like a writer node would do.\n"
                       "WARNING: The DiskCache node must be part of the tree when you want to read cached data from it.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) );
    ret->setProperty<std::string>(kNatronPluginPropDescription, desc.toStdString());
    EffectDescriptionPtr effectDesc = ret->getEffectDescriptor();
    effectDesc->setProperty<RenderSafetyEnum>(kEffectPropRenderThreadSafety, eRenderSafetyFullySafe);
    effectDesc->setProperty<bool>(kEffectPropSupportsTiles, false);
    effectDesc->setProperty<bool>(kEffectPropSupportsMultiResolution, true);
    ret->setProperty<std::string>(kNatronPluginPropIconFilePath,  "Images/diskcache_icon.png");
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthFloat);
    ret->setProperty<std::bitset<4> >(kNatronPluginPropOutputSupportedComponents, std::bitset<4>(std::string("1111")));

    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthFloat, 0);
    ret->setProperty<std::bitset<4> >(kNatronPluginPropOutputSupportedComponents, std::bitset<4>(std::string("1111")));
    {
        InputDescriptionPtr input = InputDescription::create("Source", "", "", false, false, std::bitset<4>(std::string("1111")));
        ret->addInputDescription(input);
    }

    return ret;
}
Beispiel #2
0
NATRON_NAMESPACE_ENTER



PluginPtr
JoinViewsNode::createPlugin()
{
    std::vector<std::string> grouping;
    grouping.push_back(PLUGIN_GROUP_MULTIVIEW);
    PluginPtr ret = Plugin::create(JoinViewsNode::create, JoinViewsNode::createRenderClone, PLUGINID_NATRON_JOINVIEWS, "JoinViews", 1, 0, grouping);

    QString desc =  tr("Take in input separate views to make a multiple view stream output. "
                       "The first view from each input is copied to one of the view of the output.");
    ret->setProperty<std::string>(kNatronPluginPropDescription, desc.toStdString());
    EffectDescriptionPtr effectDesc = ret->getEffectDescriptor();
    effectDesc->setProperty<RenderSafetyEnum>(kEffectPropRenderThreadSafety, eRenderSafetyFullySafe);
    effectDesc->setProperty<bool>(kEffectPropSupportsTiles, true);
    ret->setProperty<bool>(kNatronPluginPropViewAware, true);
    ret->setProperty<std::string>(kNatronPluginPropIconFilePath,  "Images/joinViewsNode.png");
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthFloat, 0);
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthByte, 1);
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthShort, 2);
    ret->setProperty<std::bitset<4> >(kNatronPluginPropOutputSupportedComponents, std::bitset<4>(std::string("1111")));
    return ret;
}
PluginPtr
RotoShapeRenderNode::createPlugin()
{
    std::vector<std::string> grouping;
    grouping.push_back(PLUGIN_GROUP_PAINT);
    PluginPtr ret = Plugin::create(RotoShapeRenderNode::create, RotoShapeRenderNode::createRenderClone, PLUGINID_NATRON_ROTOSHAPE, "RotoShape", 1, 0, grouping);
    ret->setProperty<bool>(kNatronPluginPropIsInternalOnly, true);
    EffectDescriptionPtr effectDesc = ret->getEffectDescriptor();
    effectDesc->setProperty<RenderSafetyEnum>(kEffectPropRenderThreadSafety, eRenderSafetyFullySafe);
#ifdef ROTO_SHAPE_RENDER_CPU_USES_CAIRO
    effectDesc->setProperty<PluginOpenGLRenderSupport>(kEffectPropSupportsOpenGLRendering, ePluginOpenGLRenderSupportYes);
#else
    effectDesc->setProperty<PluginOpenGLRenderSupport>(kEffectPropSupportsOpenGLRendering, ePluginOpenGLRenderSupportNeeded);
#endif
    effectDesc->setProperty<bool>(kEffectPropSupportsTiles, false);
    effectDesc->setProperty<bool>(kEffectPropSupportsMultiResolution, true);
    effectDesc->setProperty<bool>(kEffectPropTemporalImageAccess, true);
    ret->setProperty<bool>(kNatronPluginPropMultiPlanar, true);

    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthFloat, 0);
    ret->setProperty<std::bitset<4> >(kNatronPluginPropOutputSupportedComponents, std::bitset<4>(std::string("1111")));
    {
        InputDescriptionPtr input = InputDescription::create("Source", "Source", "", true, false, std::bitset<4>(std::string("1111")));
        ret->addInputDescription(input);
    }

    return ret;
}
Beispiel #4
0
NATRON_NAMESPACE_ENTER


PluginPtr
ViewerNode::createPlugin()
{
    std::vector<std::string> grouping;
    grouping.push_back(PLUGIN_GROUP_IMAGE);
    PluginPtr ret = Plugin::create(ViewerNode::create, ViewerNode::createRenderClone, PLUGINID_NATRON_VIEWER_GROUP, "Viewer", 1, 0, grouping);

    ret->setProperty<std::string>(kNatronPluginPropIconFilePath, "Images/viewer_icon.png");
    QString desc = tr("The Viewer node can display the output of a node graph. Shift + double click on the viewer node to customize the viewer display process with a custom node tree");

    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthFloat, 0);
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthShort, 1);
    ret->setProperty<ImageBitDepthEnum>(kNatronPluginPropOutputSupportedBitDepths, eImageBitDepthByte, 2);
    ret->setProperty<std::bitset<4> >(kNatronPluginPropOutputSupportedComponents, std::bitset<4>(std::string("1111")));


    EffectDescriptionPtr effectDesc = ret->getEffectDescriptor();
    effectDesc->setProperty<RenderSafetyEnum>(kEffectPropRenderThreadSafety, eRenderSafetyFullySafe);
    effectDesc->setProperty<bool>(kEffectPropSupportsTiles, true);
    ret->setProperty<std::string>(kNatronPluginPropDescription, desc.toStdString());
    ret->setProperty<int>(kNatronPluginPropShortcut, (int)Key_I, 0);
    ret->setProperty<int>(kNatronPluginPropShortcut, (int)eKeyboardModifierControl, 1
                          );
    ret->addActionShortcut( PluginActionShortcut(kViewerInstanceParamClipToFormat, kViewerInstanceParamClipToFormatLabel, kViewerInstanceParamClipToFormatHint, Key_C, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamFullFrame, kViewerNodeParamFullFrameLabel, kViewerNodeParamFullFrameHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerInstanceParamEnableUserRoI, kViewerInstanceParamEnableUserRoILabel, kViewerInstanceParamEnableUserRoIHint, Key_W, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPauseRender, kViewerNodeParamPauseRenderLabel, kViewerNodeParamPauseRenderHint, Key_P) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamEnableGain, kViewerNodeParamEnableGainLabel, kViewerNodeParamEnableGainHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamEnableAutoContrast, kViewerNodeParamEnableAutoContrastLabel, kViewerNodeParamEnableAutoContrastHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamEnableGamma, kViewerNodeParamEnableGammaLabel, kViewerNodeParamEnableGammaHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRefreshViewport, kViewerNodeParamRefreshViewportLabel, kViewerNodeParamRefreshViewportHint, Key_U) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamFitViewport, kViewerNodeParamFitViewportLabel, kViewerNodeParamFitViewportHint, Key_F) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamSyncViewports, kViewerNodeParamSyncViewportsLabel, kViewerNodeParamSyncViewportsHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamCheckerBoard, kViewerNodeParamCheckerBoardLabel, kViewerNodeParamCheckerBoardHint) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamEnableColorPicker, kViewerNodeParamEnableColorPickerLabel, kViewerNodeParamEnableColorPickerHint) );

    // Right-click actions
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuToggleWipe, kViewerNodeParamRightClickMenuToggleWipeLabel, "", Key_W) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuCenterWipe, kViewerNodeParamRightClickMenuCenterWipeLabel, "", Key_F, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuPreviousLayer, kViewerNodeParamRightClickMenuPreviousLayerLabel, "", Key_Page_Up) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuNextLayer, kViewerNodeParamRightClickMenuNextLayerLabel, "", Key_Page_Down) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuSwitchAB, kViewerNodeParamRightClickMenuSwitchABLabel, "", Key_Return) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuPreviousView, kViewerNodeParamRightClickMenuPreviousViewLabel, "", Key_Page_Up, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuNextView, kViewerNodeParamRightClickMenuNextViewLabel, "", Key_Page_Down, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHideOverlays, kViewerNodeParamRightClickMenuShowHideOverlaysLabel, "", Key_O) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuHideAll, kViewerNodeParamRightClickMenuHideAllLabel, "", Key_space, KeyboardModifiers(eKeyboardModifierShift | eKeyboardModifierAlt) ));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuHideAllTop, kViewerNodeParamRightClickMenuHideAllTopLabel, "", Key_space, eKeyboardModifierShift ));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuHideAllBottom, kViewerNodeParamRightClickMenuHideAllBottomLabel, "", Key_space, eKeyboardModifierAlt ));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHidePlayer, kViewerNodeParamRightClickMenuShowHidePlayerLabel, "") );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHideTimeline, kViewerNodeParamRightClickMenuShowHideTimelineLabel, "") );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHideLeftToolbar, kViewerNodeParamRightClickMenuShowHideLeftToolbarLabel, "") );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHideTopToolbar, kViewerNodeParamRightClickMenuShowHideTopToolbarLabel, "") );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamRightClickMenuShowHideTabHeader, kViewerNodeParamRightClickMenuShowHideTabHeaderLabel, "") );

    // Viewer actions
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionLuminance, kViewerNodeParamActionLuminanceLabel, "", Key_Y) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionRed, kViewerNodeParamActionRedLabel, "", Key_R) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionRedA, kViewerNodeParamActionRedALabel, "", Key_R, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionGreen, kViewerNodeParamActionGreenLabel, "", Key_G) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionGreenA, kViewerNodeParamActionGreenALabel, "", Key_G, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionBlue, kViewerNodeParamActionBlueLabel, "", Key_B) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionBlueA, kViewerNodeParamActionBlueALabel, "", Key_B, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionAlpha, kViewerNodeParamActionAlphaLabel, "", Key_A) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionAlphaA, kViewerNodeParamActionAlphaALabel, "", Key_A, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionMatte, kViewerNodeParamActionMatteLabel, "", Key_M) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionMatteA, kViewerNodeParamActionMatteALabel, "", Key_M, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionZoomIn, kViewerNodeParamActionZoomInLabel,"",  Key_plus) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionZoomOut, kViewerNodeParamActionZoomOutLabel, "", Key_minus) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionScaleOne, kViewerNodeParamActionScaleOneLabel, "", Key_1, eKeyboardModifierControl) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionProxy2, kViewerNodeParamActionProxy2Label, "", Key_1, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionProxy4, kViewerNodeParamActionProxy4Label, "", Key_2, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionProxy8, kViewerNodeParamActionProxy8Label, "", Key_3, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionProxy16, kViewerNodeParamActionProxy16Label, "", Key_4, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionProxy32, kViewerNodeParamActionProxy32Label, "", Key_5, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionLeftView, kViewerNodeParamActionLeftViewLabel, "", Key_Left, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionRightView, kViewerNodeParamActionRightViewLabel, "", Key_Right, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionCreateNewRoI, kViewerNodeParamActionCreateNewRoILabel, "", Key_W, eKeyboardModifierAlt) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionPauseAB, kViewerNodeParamActionPauseABLabel, "", Key_P, eKeyboardModifierShift) );
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionRefreshWithStats, kViewerNodeParamActionRefreshWithStatsLabel, "", Key_U, KeyboardModifiers(eKeyboardModifierShift | eKeyboardModifierControl)) );


    // Player
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPreviousFrame, kViewerNodeParamPreviousFrameLabel, kViewerNodeParamPreviousFrameHint, Key_Left, eKeyboardModifierNone));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamNextFrame, kViewerNodeParamNextFrameLabel, kViewerNodeParamNextFrameHint, Key_Right, eKeyboardModifierNone));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPlayBackward, kViewerNodeParamPlayBackwardLabel, kViewerNodeParamPlayBackwardHint, Key_J, eKeyboardModifierNone));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPlayForward, kViewerNodeParamPlayForwardLabel, kViewerNodeParamPlayForwardHint, Key_L, eKeyboardModifierNone));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamActionAbortRender, kViewerNodeParamActionAbortRenderLabel, kViewerNodeParamActionAbortRenderHint, Key_K, eKeyboardModifierNone));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPreviousIncr, kViewerNodeParamPreviousIncrLabel, kViewerNodeParamPreviousIncrHint, Key_Left, eKeyboardModifierShift));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamNextIncr, kViewerNodeParamNextIncrLabel, kViewerNodeParamNextIncrHint, Key_Right, eKeyboardModifierShift));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamPreviousKeyFrame, kViewerNodeParamPreviousKeyFrameLabel, kViewerNodeParamPreviousKeyFrameHint, Key_Left, KeyboardModifiers(eKeyboardModifierShift | eKeyboardModifierControl)));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamNextKeyFrame, kViewerNodeParamNextKeyFrameLabel, kViewerNodeParamNextKeyFrameHint, Key_Right, KeyboardModifiers(eKeyboardModifierShift | eKeyboardModifierControl)));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamFirstFrame, kViewerNodeParamFirstFrameLabel, kViewerNodeParamFirstFrameHint, Key_Left, eKeyboardModifierControl));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamLastFrame, kViewerNodeParamLastFrameLabel, kViewerNodeParamLastFrameHint, Key_Right, eKeyboardModifierControl));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamSetInPoint, kViewerNodeParamSetInPointLabel, kViewerNodeParamSetInPointHint, Key_I, eKeyboardModifierAlt));
    ret->addActionShortcut( PluginActionShortcut(kViewerNodeParamSetOutPoint, kViewerNodeParamSetOutPointLabel, kViewerNodeParamSetOutPointHint, Key_O, eKeyboardModifierAlt));


    return ret;
}