# -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# Natron PyPlug
# This file was automatically generated by Natron PyPlug exporter version 10.

# Hand-written code should be added in a separate file named StrokeExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# Note that Viewers are never exported

import NatronEngine
import sys

# Try to import the extensions file where callbacks and hand-written code should be located.
try:
    from StrokeExt import *
except ImportError:
    pass

def getPluginID():
    return "vv.Stroke"

def getLabel():
    return "Stroke"

def getVersion():
    return 1

def getIconPath():
    return "Stroke.png"

def getGrouping():
    return "videovina/Draw"

def createInstance(app,group):
    # Create all nodes in the group

    # Create the parameters of the group node the same way we did for all internal nodes
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam("onParamChanged")
    if param is not None:
        param.setValue("stroke.main")
        del param


    # Create the user parameters
    lastNode.control = lastNode.createPageParam("control", "Control")
    param = lastNode.createStringParam("state_label", "State")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    STATE :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param

    param = lastNode.createChoiceParam("format", "Format")
    entries = [ ("Quarter HD - 480 x 270", ""),
    ("Half HD - 960 x 540", ""),
    ("Full HD - 1920 x 1080", ""),
    ("4K - 3840 x 2160", "")]
    param.setOptions(entries)
    del entries
    param.setDefaultValue("Full HD - 1920 x 1080")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param

    param = lastNode.createChoiceParam("speed", "Speed")
    entries = [ ("Slow", ""),
    ("Normal", ""),
    ("Fast", "")]
    param.setOptions(entries)
    del entries
    param.setDefaultValue("Normal")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param

    param = lastNode.createButtonParam("link", "Link To Parent")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param

    param = lastNode.createButtonParam("refresh", "Refresh")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param

    param = lastNode.createSeparatorParam("sep5", "")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param

    param = lastNode.createStringParam("time_label", "")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    TIME :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param

    param = lastNode.createIntParam("duration_percent", "Duration Percent %")
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param

    param = lastNode.createInt3DParam("durations", "Durations")
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param

    param = lastNode.createIntParam("transition_duration", "Transition Duration")
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param

    param = lastNode.createSeparatorParam("sep6", "")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param

    param = lastNode.createStringParam("settings_label", "")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    SETTINGS :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param

    param = lastNode.createChoiceParam("start_stroke", "Start Stroke")
    entries = [ ("Top Left", ""),
    ("Top Right", ""),
    ("Down Left", ""),
    ("Down Right", "")]
    param.setOptions(entries)
    del entries

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param

    param = lastNode.createIntParam("stroke_size", "Size")
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param

    param = lastNode.createIntParam("bounces", "Bounces")
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param

    # Refresh the GUI with the newly created parameters
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode

    # Start of node "Output1"
    lastNode = app.createNode("fr.inria.built-in.Output", 1, group)
    lastNode.setLabel("Output")
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode

    del lastNode
    # End of node "Output1"

    # Start of node "position"
    lastNode = app.createNode("net.sf.openfx.Position", 1, group)
    lastNode.setScriptName("position")
    lastNode.setLabel("position")
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode

    param = lastNode.getParam("translate")
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param

    del lastNode
    # End of node "position"

    # Start of node "reformat"
    lastNode = app.createNode("net.sf.openfx.Reformat", 1, group)
    lastNode.setScriptName("reformat")
    lastNode.setLabel("reformat")
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode

    param = lastNode.getParam("useRoD")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("reformatType")
    if param is not None:
        param.set("scale")
        del param

    param = lastNode.getParam("NatronParamFormatChoice")
    if param is not None:
        param.set("PC_Video")
        del param

    param = lastNode.getParam("boxSize")
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param

    param = lastNode.getParam("boxFixed")
    if param is not None:
        param.setValue(True)
        del param

    del lastNode
    # End of node "reformat"

    # Start of node "crop"
    lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group)
    lastNode.setScriptName("crop")
    lastNode.setLabel("crop")
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode

    param = lastNode.getParam("NatronParamFormatChoice")
    if param is not None:
        param.set("PC_Video")
        del param

    del lastNode
    # End of node "crop"

    # Start of node "Retime1"
    lastNode = app.createNode("net.sf.openfx.Retime", 1, group)
    lastNode.setScriptName("Retime1")
    lastNode.setLabel("Retime1")
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode

    param = lastNode.getParam("reverseInput")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("warp")
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeCubic)
        del param

    del lastNode
    # End of node "Retime1"

    # Start of node "frame_range"
    lastNode = app.createNode("net.sf.openfx.FrameRange", 1, group)
    lastNode.setScriptName("frame_range")
    lastNode.setLabel("frame_range")
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode

    param = lastNode.getParam("frameRange")
    if param is not None:
        param.setValue(100, 1)
        del param

    param = lastNode.getParam("userTextArea")
    if param is not None:
        param.setValue("<Natron>(1 - 1)</Natron>")
        del param

    del lastNode
    # End of node "frame_range"

    # Start of node "time_switch"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("time_switch")
    lastNode.setLabel("time_switch")
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param

    del lastNode
    # End of node "time_switch"

    # Start of node "mirror"
    lastNode = app.createNode("net.sf.openfx.Mirror", 1, group)
    lastNode.setScriptName("mirror")
    lastNode.setLabel("mirror")
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode

    param = lastNode.getParam("flip")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("sourceChanged")
    if param is not None:
        param.setValue(True)
        del param

    del lastNode
    # End of node "mirror"

    # Start of node "Dot1"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot1")
    lastNode.setLabel("Dot1")
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode

    del lastNode
    # End of node "Dot1"

    # Now that all nodes are created we can connect them together, restore expressions
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)

    try:
        extModule = sys.modules["StrokeExt"]
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule ,"createInstanceExt") and hasattr(extModule.createInstanceExt,"__call__"):
        extModule.createInstanceExt(app,group)

e632752f9d37b279efbefcb5a9fc67a7d18fe13d
<mask token>


def getPluginID():
    return 'vv.Stroke'


def getLabel():
    return 'Stroke'


def getVersion():
    return 1


def getIconPath():
    return 'Stroke.png'


<mask token>


def createInstance(app, group):
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam('onParamChanged')
    if param is not None:
        param.setValue('stroke.main')
        del param
    lastNode.control = lastNode.createPageParam('control', 'Control')
    param = lastNode.createStringParam('state_label', 'State')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    STATE :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param
    param = lastNode.createChoiceParam('format', 'Format')
    entries = [('Quarter HD - 480 x 270', ''), ('Half HD - 960 x 540', ''),
        ('Full HD - 1920 x 1080', ''), ('4K - 3840 x 2160', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Full HD - 1920 x 1080')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param
    param = lastNode.createChoiceParam('speed', 'Speed')
    entries = [('Slow', ''), ('Normal', ''), ('Fast', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Normal')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param
    param = lastNode.createButtonParam('link', 'Link To Parent')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param
    param = lastNode.createButtonParam('refresh', 'Refresh')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param
    param = lastNode.createSeparatorParam('sep5', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param
    param = lastNode.createStringParam('time_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    TIME :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param
    param = lastNode.createIntParam('duration_percent', 'Duration Percent %')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param
    param = lastNode.createInt3DParam('durations', 'Durations')
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param
    param = lastNode.createIntParam('transition_duration',
        'Transition Duration')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param
    param = lastNode.createSeparatorParam('sep6', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param
    param = lastNode.createStringParam('settings_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    SETTINGS :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param
    param = lastNode.createChoiceParam('start_stroke', 'Start Stroke')
    entries = [('Top Left', ''), ('Top Right', ''), ('Down Left', ''), (
        'Down Right', '')]
    param.setOptions(entries)
    del entries
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param
    param = lastNode.createIntParam('stroke_size', 'Size')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param
    param = lastNode.createIntParam('bounces', 'Bounces')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Output', 1, group)
    lastNode.setLabel('Output')
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Position', 1, group)
    lastNode.setScriptName('position')
    lastNode.setLabel('position')
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode
    param = lastNode.getParam('translate')
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Reformat', 1, group)
    lastNode.setScriptName('reformat')
    lastNode.setLabel('reformat')
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode
    param = lastNode.getParam('useRoD')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('reformatType')
    if param is not None:
        param.set('scale')
        del param
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    param = lastNode.getParam('boxSize')
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param
    param = lastNode.getParam('boxFixed')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.CropPlugin', 1, group)
    lastNode.setScriptName('crop')
    lastNode.setLabel('crop')
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Retime', 1, group)
    lastNode.setScriptName('Retime1')
    lastNode.setLabel('Retime1')
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode
    param = lastNode.getParam('reverseInput')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('warp')
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.FrameRange', 1, group)
    lastNode.setScriptName('frame_range')
    lastNode.setLabel('frame_range')
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode
    param = lastNode.getParam('frameRange')
    if param is not None:
        param.setValue(100, 1)
        del param
    param = lastNode.getParam('userTextArea')
    if param is not None:
        param.setValue('<Natron>(1 - 1)</Natron>')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.switchPlugin', 1, group)
    lastNode.setScriptName('time_switch')
    lastNode.setLabel('time_switch')
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode
    param = lastNode.getParam('which')
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Mirror', 1, group)
    lastNode.setScriptName('mirror')
    lastNode.setLabel('mirror')
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode
    param = lastNode.getParam('flip')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('sourceChanged')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Dot', 1, group)
    lastNode.setScriptName('Dot1')
    lastNode.setLabel('Dot1')
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode
    del lastNode
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)
    try:
        extModule = sys.modules['StrokeExt']
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule, 'createInstanceExt'
        ) and hasattr(extModule.createInstanceExt, '__call__'):
        extModule.createInstanceExt(app, group)

<mask token>


def getPluginID():
    return 'vv.Stroke'


def getLabel():
    return 'Stroke'


def getVersion():
    return 1


def getIconPath():
    return 'Stroke.png'


def getGrouping():
    return 'videovina/Draw'


def createInstance(app, group):
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam('onParamChanged')
    if param is not None:
        param.setValue('stroke.main')
        del param
    lastNode.control = lastNode.createPageParam('control', 'Control')
    param = lastNode.createStringParam('state_label', 'State')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    STATE :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param
    param = lastNode.createChoiceParam('format', 'Format')
    entries = [('Quarter HD - 480 x 270', ''), ('Half HD - 960 x 540', ''),
        ('Full HD - 1920 x 1080', ''), ('4K - 3840 x 2160', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Full HD - 1920 x 1080')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param
    param = lastNode.createChoiceParam('speed', 'Speed')
    entries = [('Slow', ''), ('Normal', ''), ('Fast', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Normal')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param
    param = lastNode.createButtonParam('link', 'Link To Parent')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param
    param = lastNode.createButtonParam('refresh', 'Refresh')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param
    param = lastNode.createSeparatorParam('sep5', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param
    param = lastNode.createStringParam('time_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    TIME :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param
    param = lastNode.createIntParam('duration_percent', 'Duration Percent %')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param
    param = lastNode.createInt3DParam('durations', 'Durations')
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param
    param = lastNode.createIntParam('transition_duration',
        'Transition Duration')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param
    param = lastNode.createSeparatorParam('sep6', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param
    param = lastNode.createStringParam('settings_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    SETTINGS :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param
    param = lastNode.createChoiceParam('start_stroke', 'Start Stroke')
    entries = [('Top Left', ''), ('Top Right', ''), ('Down Left', ''), (
        'Down Right', '')]
    param.setOptions(entries)
    del entries
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param
    param = lastNode.createIntParam('stroke_size', 'Size')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param
    param = lastNode.createIntParam('bounces', 'Bounces')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Output', 1, group)
    lastNode.setLabel('Output')
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Position', 1, group)
    lastNode.setScriptName('position')
    lastNode.setLabel('position')
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode
    param = lastNode.getParam('translate')
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Reformat', 1, group)
    lastNode.setScriptName('reformat')
    lastNode.setLabel('reformat')
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode
    param = lastNode.getParam('useRoD')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('reformatType')
    if param is not None:
        param.set('scale')
        del param
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    param = lastNode.getParam('boxSize')
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param
    param = lastNode.getParam('boxFixed')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.CropPlugin', 1, group)
    lastNode.setScriptName('crop')
    lastNode.setLabel('crop')
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Retime', 1, group)
    lastNode.setScriptName('Retime1')
    lastNode.setLabel('Retime1')
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode
    param = lastNode.getParam('reverseInput')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('warp')
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.FrameRange', 1, group)
    lastNode.setScriptName('frame_range')
    lastNode.setLabel('frame_range')
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode
    param = lastNode.getParam('frameRange')
    if param is not None:
        param.setValue(100, 1)
        del param
    param = lastNode.getParam('userTextArea')
    if param is not None:
        param.setValue('<Natron>(1 - 1)</Natron>')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.switchPlugin', 1, group)
    lastNode.setScriptName('time_switch')
    lastNode.setLabel('time_switch')
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode
    param = lastNode.getParam('which')
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Mirror', 1, group)
    lastNode.setScriptName('mirror')
    lastNode.setLabel('mirror')
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode
    param = lastNode.getParam('flip')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('sourceChanged')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Dot', 1, group)
    lastNode.setScriptName('Dot1')
    lastNode.setLabel('Dot1')
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode
    del lastNode
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)
    try:
        extModule = sys.modules['StrokeExt']
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule, 'createInstanceExt'
        ) and hasattr(extModule.createInstanceExt, '__call__'):
        extModule.createInstanceExt(app, group)

<mask token>
try:
    from StrokeExt import *
except ImportError:
    pass


def getPluginID():
    return 'vv.Stroke'


def getLabel():
    return 'Stroke'


def getVersion():
    return 1


def getIconPath():
    return 'Stroke.png'


def getGrouping():
    return 'videovina/Draw'


def createInstance(app, group):
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam('onParamChanged')
    if param is not None:
        param.setValue('stroke.main')
        del param
    lastNode.control = lastNode.createPageParam('control', 'Control')
    param = lastNode.createStringParam('state_label', 'State')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    STATE :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param
    param = lastNode.createChoiceParam('format', 'Format')
    entries = [('Quarter HD - 480 x 270', ''), ('Half HD - 960 x 540', ''),
        ('Full HD - 1920 x 1080', ''), ('4K - 3840 x 2160', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Full HD - 1920 x 1080')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param
    param = lastNode.createChoiceParam('speed', 'Speed')
    entries = [('Slow', ''), ('Normal', ''), ('Fast', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Normal')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param
    param = lastNode.createButtonParam('link', 'Link To Parent')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param
    param = lastNode.createButtonParam('refresh', 'Refresh')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param
    param = lastNode.createSeparatorParam('sep5', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param
    param = lastNode.createStringParam('time_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    TIME :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param
    param = lastNode.createIntParam('duration_percent', 'Duration Percent %')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param
    param = lastNode.createInt3DParam('durations', 'Durations')
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param
    param = lastNode.createIntParam('transition_duration',
        'Transition Duration')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param
    param = lastNode.createSeparatorParam('sep6', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param
    param = lastNode.createStringParam('settings_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    SETTINGS :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param
    param = lastNode.createChoiceParam('start_stroke', 'Start Stroke')
    entries = [('Top Left', ''), ('Top Right', ''), ('Down Left', ''), (
        'Down Right', '')]
    param.setOptions(entries)
    del entries
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param
    param = lastNode.createIntParam('stroke_size', 'Size')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param
    param = lastNode.createIntParam('bounces', 'Bounces')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Output', 1, group)
    lastNode.setLabel('Output')
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Position', 1, group)
    lastNode.setScriptName('position')
    lastNode.setLabel('position')
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode
    param = lastNode.getParam('translate')
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Reformat', 1, group)
    lastNode.setScriptName('reformat')
    lastNode.setLabel('reformat')
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode
    param = lastNode.getParam('useRoD')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('reformatType')
    if param is not None:
        param.set('scale')
        del param
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    param = lastNode.getParam('boxSize')
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param
    param = lastNode.getParam('boxFixed')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.CropPlugin', 1, group)
    lastNode.setScriptName('crop')
    lastNode.setLabel('crop')
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Retime', 1, group)
    lastNode.setScriptName('Retime1')
    lastNode.setLabel('Retime1')
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode
    param = lastNode.getParam('reverseInput')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('warp')
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.FrameRange', 1, group)
    lastNode.setScriptName('frame_range')
    lastNode.setLabel('frame_range')
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode
    param = lastNode.getParam('frameRange')
    if param is not None:
        param.setValue(100, 1)
        del param
    param = lastNode.getParam('userTextArea')
    if param is not None:
        param.setValue('<Natron>(1 - 1)</Natron>')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.switchPlugin', 1, group)
    lastNode.setScriptName('time_switch')
    lastNode.setLabel('time_switch')
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode
    param = lastNode.getParam('which')
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Mirror', 1, group)
    lastNode.setScriptName('mirror')
    lastNode.setLabel('mirror')
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode
    param = lastNode.getParam('flip')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('sourceChanged')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Dot', 1, group)
    lastNode.setScriptName('Dot1')
    lastNode.setLabel('Dot1')
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode
    del lastNode
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)
    try:
        extModule = sys.modules['StrokeExt']
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule, 'createInstanceExt'
        ) and hasattr(extModule.createInstanceExt, '__call__'):
        extModule.createInstanceExt(app, group)

import NatronEngine
import sys
try:
    from StrokeExt import *
except ImportError:
    pass


def getPluginID():
    return 'vv.Stroke'


def getLabel():
    return 'Stroke'


def getVersion():
    return 1


def getIconPath():
    return 'Stroke.png'


def getGrouping():
    return 'videovina/Draw'


def createInstance(app, group):
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam('onParamChanged')
    if param is not None:
        param.setValue('stroke.main')
        del param
    lastNode.control = lastNode.createPageParam('control', 'Control')
    param = lastNode.createStringParam('state_label', 'State')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    STATE :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param
    param = lastNode.createChoiceParam('format', 'Format')
    entries = [('Quarter HD - 480 x 270', ''), ('Half HD - 960 x 540', ''),
        ('Full HD - 1920 x 1080', ''), ('4K - 3840 x 2160', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Full HD - 1920 x 1080')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param
    param = lastNode.createChoiceParam('speed', 'Speed')
    entries = [('Slow', ''), ('Normal', ''), ('Fast', '')]
    param.setOptions(entries)
    del entries
    param.setDefaultValue('Normal')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param
    param = lastNode.createButtonParam('link', 'Link To Parent')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param
    param = lastNode.createButtonParam('refresh', 'Refresh')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param
    param = lastNode.createSeparatorParam('sep5', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param
    param = lastNode.createStringParam('time_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    TIME :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param
    param = lastNode.createIntParam('duration_percent', 'Duration Percent %')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param
    param = lastNode.createInt3DParam('durations', 'Durations')
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param
    param = lastNode.createIntParam('transition_duration',
        'Transition Duration')
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param
    param = lastNode.createSeparatorParam('sep6', '')
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param
    param = lastNode.createStringParam('settings_label', '')
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue('- - - - - - - >    SETTINGS :')
    param.restoreDefaultValue()
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param
    param = lastNode.createChoiceParam('start_stroke', 'Start Stroke')
    entries = [('Top Left', ''), ('Top Right', ''), ('Down Left', ''), (
        'Down Right', '')]
    param.setOptions(entries)
    del entries
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param
    param = lastNode.createIntParam('stroke_size', 'Size')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param
    param = lastNode.createIntParam('bounces', 'Bounces')
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    lastNode.control.addParam(param)
    param.setHelp('')
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Output', 1, group)
    lastNode.setLabel('Output')
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Position', 1, group)
    lastNode.setScriptName('position')
    lastNode.setLabel('position')
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode
    param = lastNode.getParam('translate')
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Reformat', 1, group)
    lastNode.setScriptName('reformat')
    lastNode.setLabel('reformat')
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode
    param = lastNode.getParam('useRoD')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('reformatType')
    if param is not None:
        param.set('scale')
        del param
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    param = lastNode.getParam('boxSize')
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param
    param = lastNode.getParam('boxFixed')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.CropPlugin', 1, group)
    lastNode.setScriptName('crop')
    lastNode.setLabel('crop')
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode
    param = lastNode.getParam('NatronParamFormatChoice')
    if param is not None:
        param.set('PC_Video')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Retime', 1, group)
    lastNode.setScriptName('Retime1')
    lastNode.setLabel('Retime1')
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode
    param = lastNode.getParam('reverseInput')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('warp')
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.
            KeyframeTypeEnum.eKeyframeTypeCubic)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.FrameRange', 1, group)
    lastNode.setScriptName('frame_range')
    lastNode.setLabel('frame_range')
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode
    param = lastNode.getParam('frameRange')
    if param is not None:
        param.setValue(100, 1)
        del param
    param = lastNode.getParam('userTextArea')
    if param is not None:
        param.setValue('<Natron>(1 - 1)</Natron>')
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.switchPlugin', 1, group)
    lastNode.setScriptName('time_switch')
    lastNode.setLabel('time_switch')
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode
    param = lastNode.getParam('which')
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param
    del lastNode
    lastNode = app.createNode('net.sf.openfx.Mirror', 1, group)
    lastNode.setScriptName('mirror')
    lastNode.setLabel('mirror')
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode
    param = lastNode.getParam('flip')
    if param is not None:
        param.setValue(True)
        del param
    param = lastNode.getParam('sourceChanged')
    if param is not None:
        param.setValue(True)
        del param
    del lastNode
    lastNode = app.createNode('fr.inria.built-in.Dot', 1, group)
    lastNode.setScriptName('Dot1')
    lastNode.setLabel('Dot1')
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode
    del lastNode
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)
    try:
        extModule = sys.modules['StrokeExt']
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule, 'createInstanceExt'
        ) and hasattr(extModule.createInstanceExt, '__call__'):
        extModule.createInstanceExt(app, group)

# -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# Natron PyPlug
# This file was automatically generated by Natron PyPlug exporter version 10.

# Hand-written code should be added in a separate file named StrokeExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# Note that Viewers are never exported

import NatronEngine
import sys

# Try to import the extensions file where callbacks and hand-written code should be located.
try:
    from StrokeExt import *
except ImportError:
    pass

def getPluginID():
    return "vv.Stroke"

def getLabel():
    return "Stroke"

def getVersion():
    return 1

def getIconPath():
    return "Stroke.png"

def getGrouping():
    return "videovina/Draw"

def createInstance(app,group):
    # Create all nodes in the group

    # Create the parameters of the group node the same way we did for all internal nodes
    lastNode = group
    lastNode.setColor(0.7, 0.7, 0.7)
    param = lastNode.getParam("onParamChanged")
    if param is not None:
        param.setValue("stroke.main")
        del param


    # Create the user parameters
    lastNode.control = lastNode.createPageParam("control", "Control")
    param = lastNode.createStringParam("state_label", "State")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    STATE :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.state_label = param
    del param

    param = lastNode.createChoiceParam("format", "Format")
    entries = [ ("Quarter HD - 480 x 270", ""),
    ("Half HD - 960 x 540", ""),
    ("Full HD - 1920 x 1080", ""),
    ("4K - 3840 x 2160", "")]
    param.setOptions(entries)
    del entries
    param.setDefaultValue("Full HD - 1920 x 1080")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.format = param
    del param

    param = lastNode.createChoiceParam("speed", "Speed")
    entries = [ ("Slow", ""),
    ("Normal", ""),
    ("Fast", "")]
    param.setOptions(entries)
    del entries
    param.setDefaultValue("Normal")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.speed = param
    del param

    param = lastNode.createButtonParam("link", "Link To Parent")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.link = param
    del param

    param = lastNode.createButtonParam("refresh", "Refresh")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setEvaluateOnChange(False)
    lastNode.refresh = param
    del param

    param = lastNode.createSeparatorParam("sep5", "")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep5 = param
    del param

    param = lastNode.createStringParam("time_label", "")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    TIME :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.time_label = param
    del param

    param = lastNode.createIntParam("duration_percent", "Duration Percent %")
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.duration_percent = param
    del param

    param = lastNode.createInt3DParam("durations", "Durations")
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(100, 1)
    param.setDefaultValue(0, 1)
    param.restoreDefaultValue(1)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(100, 2)
    param.setDefaultValue(0, 2)
    param.restoreDefaultValue(2)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    param.setValue(150, 0)
    param.setValue(100, 1)
    param.setValue(50, 2)
    lastNode.durations = param
    del param

    param = lastNode.createIntParam("transition_duration", "Transition Duration")
    param.setMinimum(0, 0)
    param.setMaximum(100, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(100, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(50, 0)
    lastNode.transition_duration = param
    del param

    param = lastNode.createSeparatorParam("sep6", "")

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setPersistent(False)
    param.setEvaluateOnChange(False)
    lastNode.sep6 = param
    del param

    param = lastNode.createStringParam("settings_label", "")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("- - - - - - - >    SETTINGS :")
    param.restoreDefaultValue()

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setEvaluateOnChange(False)
    param.setAnimationEnabled(False)
    lastNode.settings_label = param
    del param

    param = lastNode.createChoiceParam("start_stroke", "Start Stroke")
    entries = [ ("Top Left", ""),
    ("Top Right", ""),
    ("Down Left", ""),
    ("Down Right", "")]
    param.setOptions(entries)
    del entries

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.start_stroke = param
    del param

    param = lastNode.createIntParam("stroke_size", "Size")
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(500, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(100, 0)
    lastNode.stroke_size = param
    del param

    param = lastNode.createIntParam("bounces", "Bounces")
    param.setMinimum(1, 0)
    param.setDisplayMinimum(2, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(0, 0)
    param.restoreDefaultValue(0)

    # Add the param to the page
    lastNode.control.addParam(param)

    # Set param properties
    param.setHelp("")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    param.setValue(4, 0)
    lastNode.bounces = param
    del param

    # Refresh the GUI with the newly created parameters
    lastNode.setPagesOrder(['control', 'Node', 'Settings'])
    lastNode.refreshUserParamsGUI()
    del lastNode

    # Start of node "Output1"
    lastNode = app.createNode("fr.inria.built-in.Output", 1, group)
    lastNode.setLabel("Output")
    lastNode.setPosition(1136, 1272)
    lastNode.setSize(104, 30)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupOutput1 = lastNode

    del lastNode
    # End of node "Output1"

    # Start of node "position"
    lastNode = app.createNode("net.sf.openfx.Position", 1, group)
    lastNode.setScriptName("position")
    lastNode.setLabel("position")
    lastNode.setPosition(1136, 724)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupposition = lastNode

    param = lastNode.getParam("translate")
    if param is not None:
        param.setValue(33.09810312739603, 1)
        del param

    del lastNode
    # End of node "position"

    # Start of node "reformat"
    lastNode = app.createNode("net.sf.openfx.Reformat", 1, group)
    lastNode.setScriptName("reformat")
    lastNode.setLabel("reformat")
    lastNode.setPosition(1136, 808)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupreformat = lastNode

    param = lastNode.getParam("useRoD")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("reformatType")
    if param is not None:
        param.set("scale")
        del param

    param = lastNode.getParam("NatronParamFormatChoice")
    if param is not None:
        param.set("PC_Video")
        del param

    param = lastNode.getParam("boxSize")
    if param is not None:
        param.setValue(3840, 0)
        param.setValue(2160, 1)
        del param

    param = lastNode.getParam("boxFixed")
    if param is not None:
        param.setValue(True)
        del param

    del lastNode
    # End of node "reformat"

    # Start of node "crop"
    lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group)
    lastNode.setScriptName("crop")
    lastNode.setLabel("crop")
    lastNode.setPosition(1136, 766)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupcrop = lastNode

    param = lastNode.getParam("NatronParamFormatChoice")
    if param is not None:
        param.set("PC_Video")
        del param

    del lastNode
    # End of node "crop"

    # Start of node "Retime1"
    lastNode = app.createNode("net.sf.openfx.Retime", 1, group)
    lastNode.setScriptName("Retime1")
    lastNode.setLabel("Retime1")
    lastNode.setPosition(1436, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupRetime1 = lastNode

    param = lastNode.getParam("reverseInput")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("warp")
    if param is not None:
        param.setCurveColor(0, 0.5, 0.5, 1)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 0, 1, 1, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeCubic)
        param.addControlPoint(0, 1, 1, 1, 1, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeCubic)
        del param

    del lastNode
    # End of node "Retime1"

    # Start of node "frame_range"
    lastNode = app.createNode("net.sf.openfx.FrameRange", 1, group)
    lastNode.setScriptName("frame_range")
    lastNode.setLabel("frame_range")
    lastNode.setPosition(1136, 850)
    lastNode.setSize(104, 55)
    lastNode.setColor(0.7, 0.65, 0.35)
    groupframe_range = lastNode

    param = lastNode.getParam("frameRange")
    if param is not None:
        param.setValue(100, 1)
        del param

    param = lastNode.getParam("userTextArea")
    if param is not None:
        param.setValue("<Natron>(1 - 1)</Natron>")
        del param

    del lastNode
    # End of node "frame_range"

    # Start of node "time_switch"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("time_switch")
    lastNode.setLabel("time_switch")
    lastNode.setPosition(1136, 957)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    grouptime_switch = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValueAtTime(0, 50, 0)
        param.setValueAtTime(1, 51, 0)
        del param

    del lastNode
    # End of node "time_switch"

    # Start of node "mirror"
    lastNode = app.createNode("net.sf.openfx.Mirror", 1, group)
    lastNode.setScriptName("mirror")
    lastNode.setLabel("mirror")
    lastNode.setPosition(1136, 1084)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupmirror = lastNode

    param = lastNode.getParam("flip")
    if param is not None:
        param.setValue(True)
        del param

    param = lastNode.getParam("sourceChanged")
    if param is not None:
        param.setValue(True)
        del param

    del lastNode
    # End of node "mirror"

    # Start of node "Dot1"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot1")
    lastNode.setLabel("Dot1")
    lastNode.setPosition(1481, 870)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot1 = lastNode

    del lastNode
    # End of node "Dot1"

    # Now that all nodes are created we can connect them together, restore expressions
    groupOutput1.connectInput(0, groupmirror)
    groupreformat.connectInput(0, groupcrop)
    groupcrop.connectInput(0, groupposition)
    groupRetime1.connectInput(0, groupDot1)
    groupframe_range.connectInput(0, groupreformat)
    grouptime_switch.connectInput(0, groupframe_range)
    grouptime_switch.connectInput(1, groupRetime1)
    groupmirror.connectInput(0, grouptime_switch)
    groupDot1.connectInput(0, groupframe_range)

    try:
        extModule = sys.modules["StrokeExt"]
    except KeyError:
        extModule = None
    if extModule is not None and hasattr(extModule ,"createInstanceExt") and hasattr(extModule.createInstanceExt,"__call__"):
        extModule.createInstanceExt(app,group)
