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

# Hand-written code should be added in a separate file named GlowExt.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 GlowExt import *
except ImportError:
    pass

def getPluginID():
    return "fr.inria.Glow"

def getLabel():
    return "Glow"

def getVersion():
    return 1

def getIconPath():
    return "Glow.png"

def getGrouping():
    return "Filter"

def getPluginDescription():
    return "A glow effect based on the bloom filter node. The mask input limits the area where the glowing elements are. It does not cut off the shine produced by the glow. \n\nFor more interesting looks there are some additional features like stretch, rotation and postgrade.\nWritten by PostPollux"

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

    # Create the user parameters
    lastNode.controls = lastNode.createPageParam("controls", "Controls")
    param = lastNode.createGroupParam("glowMap", "Glow Map")

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

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

    param = lastNode.createDoubleParam("isolateHighlights", "Isolate Highlights")
    param.setMinimum(0, 0)
    param.setMaximum(1, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(1, 0)
    param.setDefaultValue(0.25, 0)
    param.restoreDefaultValue(0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowMap.addParam(param)

    # Set param properties
    param.setHelp("\"Isolate Highlights\" controls on which parts of the image the glow is applied. \n\nhigh value -> only bright areas\n")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.isolateHighlights = param
    del param

    param = lastNode.createBooleanParam("isolateHue", "Isolate Hue")

    # Add the param to the group, no need to add it to the page
    lastNode.glowMap.addParam(param)

    # Set param properties
    param.setHelp("If checked, the picked hue will additionally limit the areas of the glow.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.isolateHue = param
    del param

    param = lastNode.createColorParam("HSVTool1srcColor", "pick Hue", False)
    param.setMinimum(-1.79769e+308, 0)
    param.setMaximum(1.79769e+308, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(1, 0)
    param.setMinimum(-1.79769e+308, 1)
    param.setMaximum(1.79769e+308, 1)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(1, 1)
    param.setMinimum(-1.79769e+308, 2)
    param.setMaximum(1.79769e+308, 2)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(1, 2)

    # Add the param to the group, no need to add it to the page
    lastNode.glowMap.addParam(param)

    # Set param properties
    param.setHelp("Pick a color in the viewport to isolate it\'s hue.\n\nThe glow will only be applied to those areas, if \'Isolate Hue\' is checked.")
    param.setAddNewLine(False)
    param.setAnimationEnabled(True)
    lastNode.HSVTool1srcColor = param
    del param

    param = lastNode.createBooleanParam("preview", "GlowMap Preview")

    # Add the param to the group, no need to add it to the page
    lastNode.glowMap.addParam(param)

    # Set param properties
    param.setHelp("When checked, the output will be the glowmap. Use this as a preview to adjust the highlight and hue isolation.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.preview = param
    del param

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

    # Add the param to the group, no need to add it to the page
    lastNode.glowMap.addParam(param)

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

    param = lastNode.createGroupParam("glowEffect", "Glow Effect")

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

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

    param = lastNode.createDoubleParam("size", "Size")
    param.setMinimum(0, 0)
    param.setMaximum(2147483647, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(3, 0)
    param.restoreDefaultValue(0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setHelp("This will change the size of the glow.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.size = param
    del param

    param = lastNode.createDoubleParam("BloombloomRatio", "Ratio")
    param.setMinimum(1, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(4, 0)
    param.setDefaultValue(2, 0)
    param.restoreDefaultValue(0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

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

    param = lastNode.createIntParam("iterations", "Iterations")
    param.setMinimum(1, 0)
    param.setMaximum(10, 0)
    param.setDisplayMinimum(1, 0)
    param.setDisplayMaximum(10, 0)
    param.setDefaultValue(7, 0)
    param.restoreDefaultValue(0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setHelp("Number of blur kernels of the bloom filter. The original implementation uses a value of 5. Higher values give a wider of heavier tail (the size of the largest blur kernel is 2**bloomCount*size). A count of 1 is just the original blur.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.iterations = param
    del param

    param = lastNode.createChoiceParam("Bloomfilter", "Filter")

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setHelp("Bluring filter. The quasi-Gaussian filter should be appropriate in most cases. The Gaussian filter is more isotropic (its impulse response has rotational symmetry), but slower.\nQuadratic might also look a bit better, but it is slower, too.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(False)
    lastNode.Bloomfilter = param
    del param

    param = lastNode.createDoubleParam("stretch", "Stretch")
    param.setMinimum(0, 0)
    param.setMaximum(1, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(1, 0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setHelp("Stretch the glow!\n\n0 -> uniform proportions\n1 -> blur only in one direction")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.stretch = param
    del param

    param = lastNode.createDoubleParam("rotate", "Rotate")
    param.setMinimum(-2147483648, 0)
    param.setMaximum(2147483647, 0)
    param.setDisplayMinimum(-360, 0)
    param.setDisplayMaximum(360, 0)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setHelp("This will rotate your stretched glow. If \"Stretch\" is 0 it won\'t have any effect.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.rotate = param
    del param

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

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

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

    param = lastNode.createStringParam("postgradeLabel", "")
    param.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
    param.setDefaultValue("Postgrade")
    param.restoreDefaultValue()

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

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

    param = lastNode.createColorParam("PostGradeMasterGain", "Gain", True)
    param.setMinimum(-1.79769e+308, 0)
    param.setMaximum(1.79769e+308, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(4, 0)
    param.setDefaultValue(1, 0)
    param.restoreDefaultValue(0)
    param.setMinimum(-1.79769e+308, 1)
    param.setMaximum(1.79769e+308, 1)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(4, 1)
    param.setDefaultValue(1, 1)
    param.restoreDefaultValue(1)
    param.setMinimum(-1.79769e+308, 2)
    param.setMaximum(1.79769e+308, 2)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(4, 2)
    param.setDefaultValue(1, 2)
    param.restoreDefaultValue(2)
    param.setMinimum(-1.79769e+308, 3)
    param.setMaximum(1.79769e+308, 3)
    param.setDisplayMinimum(0, 3)
    param.setDisplayMaximum(4, 3)
    param.setDefaultValue(1, 3)
    param.restoreDefaultValue(3)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.PostGradeMasterGain = param
    del param

    param = lastNode.createColorParam("PostGradeMasterGamma", "Gamma", True)
    param.setMinimum(-1.79769e+308, 0)
    param.setMaximum(1.79769e+308, 0)
    param.setDisplayMinimum(0.2, 0)
    param.setDisplayMaximum(5, 0)
    param.setDefaultValue(1, 0)
    param.restoreDefaultValue(0)
    param.setMinimum(-1.79769e+308, 1)
    param.setMaximum(1.79769e+308, 1)
    param.setDisplayMinimum(0.2, 1)
    param.setDisplayMaximum(5, 1)
    param.setDefaultValue(1, 1)
    param.restoreDefaultValue(1)
    param.setMinimum(-1.79769e+308, 2)
    param.setMaximum(1.79769e+308, 2)
    param.setDisplayMinimum(0.2, 2)
    param.setDisplayMaximum(5, 2)
    param.setDefaultValue(1, 2)
    param.restoreDefaultValue(2)
    param.setMinimum(-1.79769e+308, 3)
    param.setMaximum(1.79769e+308, 3)
    param.setDisplayMinimum(0.2, 3)
    param.setDisplayMaximum(5, 3)
    param.setDefaultValue(1, 3)
    param.restoreDefaultValue(3)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.PostGradeMasterGamma = param
    del param

    param = lastNode.createColorParam("PostGradeMasterSaturation", "Saturation", True)
    param.setMinimum(-1.79769e+308, 0)
    param.setMaximum(1.79769e+308, 0)
    param.setDisplayMinimum(0, 0)
    param.setDisplayMaximum(4, 0)
    param.setDefaultValue(1, 0)
    param.restoreDefaultValue(0)
    param.setMinimum(-1.79769e+308, 1)
    param.setMaximum(1.79769e+308, 1)
    param.setDisplayMinimum(0, 1)
    param.setDisplayMaximum(4, 1)
    param.setDefaultValue(1, 1)
    param.restoreDefaultValue(1)
    param.setMinimum(-1.79769e+308, 2)
    param.setMaximum(1.79769e+308, 2)
    param.setDisplayMinimum(0, 2)
    param.setDisplayMaximum(4, 2)
    param.setDefaultValue(1, 2)
    param.restoreDefaultValue(2)
    param.setMinimum(-1.79769e+308, 3)
    param.setMaximum(1.79769e+308, 3)
    param.setDisplayMinimum(0, 3)
    param.setDisplayMaximum(4, 3)
    param.setDefaultValue(1, 3)
    param.restoreDefaultValue(3)

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

    # Set param properties
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.PostGradeMasterSaturation = param
    del param

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

    # Add the param to the group, no need to add it to the page
    lastNode.glowEffect.addParam(param)

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

    param = lastNode.createGroupParam("options", "Options")

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

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

    param = lastNode.createBooleanParam("screen", "Screen")

    # Add the param to the group, no need to add it to the page
    lastNode.options.addParam(param)

    # Set param properties
    param.setHelp("If checked, the bloomed image will be screened on top of the input image. This helps to preserve the highlights in your image.\n\nBy default it is added on top of the imput image. (plus)")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.screen = param
    del param

    param = lastNode.createBooleanParam("addInput", "Add Input")

    # Add the param to the group, no need to add it to the page
    lastNode.options.addParam(param)

    # Set param properties
    param.setHelp("Add the input image to the bloomed one.\n")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.addInput = param
    del param

    param = lastNode.createBooleanParam("glowOnly", "Glow Only")

    # Add the param to the group, no need to add it to the page
    lastNode.options.addParam(param)

    # Set param properties
    param.setHelp("The output will only be the glow effect itself.\n\nYou can add it on top of your source with a plus-merge or a screen-merge, later.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.glowOnly = param
    del param

    param = lastNode.createBooleanParam("expRoD", "expand RoD")

    # Add the param to the group, no need to add it to the page
    lastNode.options.addParam(param)

    # Set param properties
    param.setHelp("By default the Region of Definition (RoD) will be cropped to the input RoD.\nUse this option, if you want the glow effect to be available even outside your input format, and thus being not cropped.\nAs the blur sizes of the bloom node can get very big, this may lead to a very big RoD! Especially, if you use a lot of iterations.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.expRoD = param
    del param

    param = lastNode.createBooleanParam("alpha", "apply on alpha ")

    # Add the param to the group, no need to add it to the page
    lastNode.options.addParam(param)

    # Set param properties
    param.setHelp("Controls if the glow is applied to the alpha channel, too.")
    param.setAddNewLine(True)
    param.setAnimationEnabled(True)
    lastNode.alpha = param
    del param

    lastNode.userNatron = lastNode.createPageParam("userNatron", "User")
    # Refresh the GUI with the newly created parameters
    lastNode.setPagesOrder(['controls', 'Node', 'Settings', 'userNatron'])
    lastNode.refreshUserParamsGUI()
    del lastNode

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

    del lastNode
    # End of node "Output1"

    # Start of node "Input1"
    lastNode = app.createNode("fr.inria.built-in.Input", 1, group)
    lastNode.setScriptName("Input1")
    lastNode.setLabel("Input1")
    lastNode.setPosition(1440, -862)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.3, 0.5, 0.2)
    groupInput1 = lastNode

    del lastNode
    # End of node "Input1"

    # Start of node "Merge1"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge1")
    lastNode.setLabel("Merge1")
    lastNode.setPosition(1423, 1316)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge1 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("plus")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("plus")
        del param

    param = lastNode.getParam("AChannelsA")
    if param is not None:
        param.setValue(False)
        del param

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

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

    del lastNode
    # End of node "Merge1"

    # Start of node "AddInput"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("AddInput")
    lastNode.setLabel("AddInput")
    lastNode.setPosition(1141, 550)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupAddInput = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValue(0, 0)
        del param

    del lastNode
    # End of node "AddInput"

    # Start of node "RoD"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("RoD")
    lastNode.setLabel("RoD")
    lastNode.setPosition(1141, 794)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupRoD = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("copy")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("copy")
        del param

    param = lastNode.getParam("bbox")
    if param is not None:
        param.set("B")
        del param

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

    del lastNode
    # End of node "RoD"

    # Start of node "Dot13"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot13")
    lastNode.setLabel("Dot13")
    lastNode.setPosition(1495, 820)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot13 = lastNode

    del lastNode
    # End of node "Dot13"

    # Start of node "Preview"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("Preview")
    lastNode.setLabel("Preview")
    lastNode.setPosition(1474, 1741)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupPreview = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValue(0, 0)
        del param

    del lastNode
    # End of node "Preview"

    # Start of node "Dot17"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot17")
    lastNode.setLabel("Dot17")
    lastNode.setPosition(1658, -735)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot17 = lastNode

    del lastNode
    # End of node "Dot17"

    # Start of node "Dot18"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot18")
    lastNode.setLabel("Dot18")
    lastNode.setPosition(1248, 1747)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot18 = lastNode

    del lastNode
    # End of node "Dot18"

    # Start of node "GlowOnly"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("GlowOnly")
    lastNode.setLabel("GlowOnly")
    lastNode.setPosition(1203, 1571)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupGlowOnly = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValue(0, 0)
        del param

    del lastNode
    # End of node "GlowOnly"

    # Start of node "Dot7"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot7")
    lastNode.setLabel("Dot7")
    lastNode.setPosition(1667, 1221)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot7 = lastNode

    del lastNode
    # End of node "Dot7"

    # Start of node "RotateIn"
    lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group)
    lastNode.setScriptName("RotateIn")
    lastNode.setLabel("RotateIn")
    lastNode.setPosition(1440, -658)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupRotateIn = lastNode

    param = lastNode.getParam("rotate")
    if param is not None:
        param.setValue(0, 0)
        del param

    param = lastNode.getParam("center")
    if param is not None:
        param.setValue(980, 0)
        del param

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

    del lastNode
    # End of node "RotateIn"

    # Start of node "Dot19"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot19")
    lastNode.setLabel("Dot19")
    lastNode.setPosition(1485, -735)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot19 = lastNode

    del lastNode
    # End of node "Dot19"

    # Start of node "RotateOut"
    lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group)
    lastNode.setScriptName("RotateOut")
    lastNode.setLabel("RotateOut")
    lastNode.setPosition(1141, 1252)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupRotateOut = lastNode

    param = lastNode.getParam("rotate")
    if param is not None:
        param.setValue(0, 0)
        del param

    param = lastNode.getParam("center")
    if param is not None:
        param.setValue(980, 0)
        param.setValue(540, 1)
        del param

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

    del lastNode
    # End of node "RotateOut"

    # Start of node "RotateOutPrev"
    lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group)
    lastNode.setScriptName("RotateOutPrev")
    lastNode.setLabel("RotateOutPrev")
    lastNode.setPosition(1474, 1537)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.7, 0.3, 0.1)
    groupRotateOutPrev = lastNode

    param = lastNode.getParam("rotate")
    if param is not None:
        param.setValue(0, 0)
        del param

    param = lastNode.getParam("center")
    if param is not None:
        param.setValue(980, 0)
        param.setValue(540, 1)
        del param

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

    del lastNode
    # End of node "RotateOutPrev"

    # Start of node "RoD_2_2"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("RoD_2_2")
    lastNode.setLabel("RoD_2_2")
    lastNode.setPosition(1441, -541)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupRoD_2_2 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("copy")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("copy")
        del param

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

    del lastNode
    # End of node "RoD_2_2"

    # Start of node "RoD_2"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("RoD_2")
    lastNode.setLabel("RoD_2")
    lastNode.setPosition(1622, 1728)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupRoD_2 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("copy")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("copy")
        del param

    param = lastNode.getParam("bbox")
    if param is not None:
        param.set("B")
        del param

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

    del lastNode
    # End of node "RoD_2"

    # Start of node "Dot22"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot22")
    lastNode.setLabel("Dot22")
    lastNode.setPosition(1485, 190)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot22 = lastNode

    del lastNode
    # End of node "Dot22"

    # Start of node "Saturation2"
    lastNode = app.createNode("net.sf.openfx.SaturationPlugin", 2, group)
    lastNode.setScriptName("Saturation2")
    lastNode.setLabel("Saturation2")
    lastNode.setPosition(1132, -293)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.48, 0.66, 1)
    groupSaturation2 = lastNode

    param = lastNode.getParam("saturation")
    if param is not None:
        param.setValue(0, 0)
        del param

    del lastNode
    # End of node "Saturation2"

    # Start of node "Tolerance"
    lastNode = app.createNode("net.sf.openfx.GradePlugin", 2, group)
    lastNode.setScriptName("Tolerance")
    lastNode.setLabel("Tolerance")
    lastNode.setPosition(1132, -229)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.48, 0.66, 1)
    groupTolerance = lastNode

    param = lastNode.getParam("blackPoint")
    if param is not None:
        param.setValue(0.25, 0)
        param.setValue(0.25, 1)
        param.setValue(0.25, 2)
        param.setValue(0.25, 3)
        del param

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

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

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

    del lastNode
    # End of node "Tolerance"

    # Start of node "Merge3"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge3")
    lastNode.setLabel("Merge3")
    lastNode.setPosition(1440, -118)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge3 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("multiply")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("multiply")
        del param

    param = lastNode.getParam("AChannelsA")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("OutputChannelsA")
    if param is not None:
        param.setValue(False)
        del param

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

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

    del lastNode
    # End of node "Merge3"

    # Start of node "Merge4"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge4")
    lastNode.setLabel("Merge4")
    lastNode.setPosition(1132, -125)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge4 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("multiply")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("multiply")
        del param

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

    del lastNode
    # End of node "Merge4"

    # Start of node "Shuffle2"
    lastNode = app.createNode("net.sf.openfx.ShufflePlugin", 2, group)
    lastNode.setScriptName("Shuffle2")
    lastNode.setLabel("Shuffle2")
    lastNode.setPosition(957, -113)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.6, 0.24, 0.39)
    groupShuffle2 = lastNode

    param = lastNode.getParam("outputR")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    param = lastNode.getParam("outputG")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    param = lastNode.getParam("outputB")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    param = lastNode.getParam("outputA")
    if param is not None:
        param.set("0")
        del param

    del lastNode
    # End of node "Shuffle2"

    # Start of node "mask"
    lastNode = app.createNode("fr.inria.built-in.Input", 1, group)
    lastNode.setScriptName("mask")
    lastNode.setLabel("mask")
    lastNode.setPosition(587, -106)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.3, 0.5, 0.2)
    groupmask = lastNode

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

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

    del lastNode
    # End of node "mask"

    # Start of node "PostGrade"
    lastNode = app.createNode("net.sf.openfx.ColorCorrectPlugin", 2, group)
    lastNode.setScriptName("PostGrade")
    lastNode.setLabel("PostGrade")
    lastNode.setPosition(1141, 1073)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.48, 0.66, 1)
    groupPostGrade = lastNode

    param = lastNode.getParam("NatronOfxParamProcessA")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("toneRanges")
    if param is not None:
        param.setCurveColor(0, 0.6, 0.4, 0.6)
        param.deleteAllControlPoints(0)
        param.addControlPoint(0, 0, 1, 0, 0, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeHorizontal)
        param.addControlPoint(0, 0.09, 0, 0, 0, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeHorizontal)
        param.setCurveColor(1, 0.8, 0.7, 0.6)
        param.deleteAllControlPoints(1)
        param.addControlPoint(1, 0.5, 0, 0, 0, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeHorizontal)
        param.addControlPoint(1, 1, 1, 0, 0, NatronEngine.Natron.KeyframeTypeEnum.eKeyframeTypeHorizontal)
        del param

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

    del lastNode
    # End of node "PostGrade"

    # Start of node "Dot15"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot15")
    lastNode.setLabel("Dot15")
    lastNode.setPosition(1658, -515)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot15 = lastNode

    del lastNode
    # End of node "Dot15"

    # Start of node "Dot20"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot20")
    lastNode.setLabel("Dot20")
    lastNode.setPosition(1178, -515)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot20 = lastNode

    del lastNode
    # End of node "Dot20"

    # Start of node "Isolate_Highlights_and_mask"
    lastNode = app.createNode("fr.inria.built-in.BackDrop", 1, group)
    lastNode.setScriptName("Isolate_Highlights_and_mask")
    lastNode.setLabel("Isolate_Highlights_and_mask")
    lastNode.setPosition(566, -401)
    lastNode.setSize(1012, 385)
    lastNode.setColor(0.45, 0.45, 0.45)
    groupIsolate_Highlights_and_mask = lastNode

    del lastNode
    # End of node "Isolate_Highlights_and_mask"

    # Start of node "Dot3"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot3")
    lastNode.setLabel("Dot3")
    lastNode.setPosition(1340, -515)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot3 = lastNode

    del lastNode
    # End of node "Dot3"

    # Start of node "Merge5"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge5")
    lastNode.setLabel("Merge5")
    lastNode.setPosition(1292, -119)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge5 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("multiply")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("multiply")
        del param

    param = lastNode.getParam("mix")
    if param is not None:
        param.setValue(0, 0)
        del param

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

    del lastNode
    # End of node "Merge5"

    # Start of node "Shuffle1"
    lastNode = app.createNode("net.sf.openfx.ShufflePlugin", 2, group)
    lastNode.setScriptName("Shuffle1")
    lastNode.setLabel("Shuffle1")
    lastNode.setPosition(1290, -206)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.6, 0.24, 0.39)
    groupShuffle1 = lastNode

    param = lastNode.getParam("outputR")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    param = lastNode.getParam("outputG")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    param = lastNode.getParam("outputB")
    if param is not None:
        param.set("A.uk.co.thefoundry.OfxImagePlaneColour.A")
        del param

    del lastNode
    # End of node "Shuffle1"

    # Start of node "HSVTool1"
    lastNode = app.createNode("net.sf.openfx.HSVToolPlugin", 1, group)
    lastNode.setScriptName("HSVTool1")
    lastNode.setLabel("HSVTool1")
    lastNode.setPosition(1294, -302)
    lastNode.setSize(104, 32)
    lastNode.setColor(0.48, 0.66, 1)
    groupHSVTool1 = lastNode

    param = lastNode.getParam("bottomLeft")
    if param is not None:
        param.setValue(960, 0)
        param.setValue(540, 1)
        del param

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

    param = lastNode.getParam("hueRangeRolloff")
    if param is not None:
        param.setValue(50, 0)
        del param

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

    param = lastNode.getParam("saturationRangeRolloff")
    if param is not None:
        param.setValue(0.3, 0)
        del param

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

    param = lastNode.getParam("brightnessRangeRolloff")
    if param is not None:
        param.setValue(0.3, 0)
        del param

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

    del lastNode
    # End of node "HSVTool1"

    # Start of node "Bloom"
    lastNode = app.createNode("net.sf.cimg.CImgBloom", 3, group)
    lastNode.setScriptName("Bloom")
    lastNode.setLabel("Bloom")
    lastNode.setPosition(975, 363)
    lastNode.setSize(80, 43)
    lastNode.setColor(0.8, 0.5, 0.3)
    groupBloom = lastNode

    param = lastNode.getParam("NatronOfxParamProcessA")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("size")
    if param is not None:
        param.setValue(3, 0)
        param.setValue(3, 1)
        del param

    param = lastNode.getParam("bloomCount")
    if param is not None:
        param.setValue(7, 0)
        del param

    param = lastNode.getParam("boundary")
    if param is not None:
        param.set("Black")
        del param

    param = lastNode.getParam("expandRoD")
    if param is not None:
        param.setValue(False)
        del param

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

    del lastNode
    # End of node "Bloom"

    # Start of node "Merge6"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge6")
    lastNode.setLabel("Merge6")
    lastNode.setPosition(1141, 351)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge6 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("plus")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("plus")
        del param

    param = lastNode.getParam("BChannelsA")
    if param is not None:
        param.setValue(False)
        del param

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

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

    del lastNode
    # End of node "Merge6"

    # Start of node "Dot14"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot14")
    lastNode.setLabel("Dot14")
    lastNode.setPosition(1008, 190)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot14 = lastNode

    del lastNode
    # End of node "Dot14"

    # Start of node "Dot16"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot16")
    lastNode.setLabel("Dot16")
    lastNode.setPosition(1186, 190)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot16 = lastNode

    del lastNode
    # End of node "Dot16"

    # Start of node "Merge2"
    lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group)
    lastNode.setScriptName("Merge2")
    lastNode.setLabel("Merge2")
    lastNode.setPosition(1272, 1317)
    lastNode.setSize(104, 56)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupMerge2 = lastNode

    param = lastNode.getParam("NatronOfxParamStringSublabelName")
    if param is not None:
        param.setValue("screen")
        del param

    param = lastNode.getParam("operation")
    if param is not None:
        param.set("screen")
        del param

    param = lastNode.getParam("AChannelsA")
    if param is not None:
        param.setValue(False)
        del param

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

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

    del lastNode
    # End of node "Merge2"

    # Start of node "screenSwitch"
    lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group)
    lastNode.setScriptName("screenSwitch")
    lastNode.setLabel("screenSwitch")
    lastNode.setPosition(1339, 1465)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.3, 0.37, 0.776)
    groupscreenSwitch = lastNode

    param = lastNode.getParam("which")
    if param is not None:
        param.setValue(0, 0)
        del param

    del lastNode
    # End of node "screenSwitch"

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

    del lastNode
    # End of node "Dot1"

    # Start of node "Dot2"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot2")
    lastNode.setLabel("Dot2")
    lastNode.setPosition(1317, 1220)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot2 = lastNode

    del lastNode
    # End of node "Dot2"

    # Start of node "Dot4"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot4")
    lastNode.setLabel("Dot4")
    lastNode.setPosition(1286, 1261)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot4 = lastNode

    del lastNode
    # End of node "Dot4"

    # Start of node "Dot5"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot5")
    lastNode.setLabel("Dot5")
    lastNode.setPosition(1398, 1261)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot5 = lastNode

    del lastNode
    # End of node "Dot5"

    # Start of node "Dot6"
    lastNode = app.createNode("fr.inria.built-in.Dot", 1, group)
    lastNode.setScriptName("Dot6")
    lastNode.setLabel("Dot6")
    lastNode.setPosition(1186, 1445)
    lastNode.setSize(15, 15)
    lastNode.setColor(0.7, 0.7, 0.7)
    groupDot6 = lastNode

    del lastNode
    # End of node "Dot6"

    # Start of node "ClampAlpha"
    lastNode = app.createNode("net.sf.openfx.Clamp", 2, group)
    lastNode.setScriptName("ClampAlpha")
    lastNode.setLabel("ClampAlpha")
    lastNode.setPosition(1203, 1685)
    lastNode.setSize(104, 43)
    lastNode.setColor(0.48, 0.66, 1)
    groupClampAlpha = lastNode

    param = lastNode.getParam("NatronOfxParamProcessR")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("NatronOfxParamProcessG")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("NatronOfxParamProcessB")
    if param is not None:
        param.setValue(False)
        del param

    param = lastNode.getParam("NatronOfxParamProcessA")
    if param is not None:
        param.setValue(False)
        del param

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

    del lastNode
    # End of node "ClampAlpha"

    # Now that all nodes are created we can connect them together, restore expressions
    groupOutput1.connectInput(0, groupRoD_2)
    groupMerge1.connectInput(0, groupDot1)
    groupMerge1.connectInput(1, groupDot5)
    groupAddInput.connectInput(0, groupBloom)
    groupAddInput.connectInput(1, groupMerge6)
    groupRoD.connectInput(0, groupDot13)
    groupRoD.connectInput(1, groupAddInput)
    groupDot13.connectInput(0, groupDot22)
    groupPreview.connectInput(0, groupDot18)
    groupPreview.connectInput(1, groupRotateOutPrev)
    groupDot17.connectInput(0, groupDot19)
    groupDot18.connectInput(0, groupClampAlpha)
    groupGlowOnly.connectInput(0, groupscreenSwitch)
    groupGlowOnly.connectInput(1, groupDot6)
    groupDot7.connectInput(0, groupDot15)
    groupRotateIn.connectInput(0, groupDot19)
    groupDot19.connectInput(0, groupInput1)
    groupRotateOut.connectInput(0, groupPostGrade)
    groupRotateOutPrev.connectInput(0, groupDot13)
    groupRoD_2_2.connectInput(0, groupDot15)
    groupRoD_2_2.connectInput(1, groupRotateIn)
    groupRoD_2.connectInput(0, groupDot7)
    groupRoD_2.connectInput(1, groupPreview)
    groupDot22.connectInput(0, groupMerge3)
    groupSaturation2.connectInput(0, groupDot20)
    groupTolerance.connectInput(0, groupSaturation2)
    groupMerge3.connectInput(0, groupRoD_2_2)
    groupMerge3.connectInput(1, groupMerge5)
    groupMerge4.connectInput(0, groupTolerance)
    groupMerge4.connectInput(1, groupShuffle2)
    groupShuffle2.connectInput(1, groupmask)
    groupPostGrade.connectInput(0, groupRoD)
    groupDot15.connectInput(0, groupDot17)
    groupDot20.connectInput(0, groupDot3)
    groupDot3.connectInput(0, groupRoD_2_2)
    groupMerge5.connectInput(0, groupMerge4)
    groupMerge5.connectInput(1, groupShuffle1)
    groupShuffle1.connectInput(1, groupHSVTool1)
    groupHSVTool1.connectInput(0, groupDot3)
    groupBloom.connectInput(0, groupDot14)
    groupMerge6.connectInput(0, groupDot16)
    groupMerge6.connectInput(1, groupBloom)
    groupDot14.connectInput(0, groupDot16)
    groupDot16.connectInput(0, groupDot22)
    groupMerge2.connectInput(0, groupDot2)
    groupMerge2.connectInput(1, groupDot4)
    groupscreenSwitch.connectInput(0, groupMerge1)
    groupscreenSwitch.connectInput(1, groupMerge2)
    groupDot1.connectInput(0, groupDot7)
    groupDot2.connectInput(0, groupDot1)
    groupDot4.connectInput(0, groupRotateOut)
    groupDot5.connectInput(0, groupDot4)
    groupDot6.connectInput(0, groupRotateOut)
    groupClampAlpha.connectInput(0, groupGlowOnly)

    param = groupMerge1.getParam("AChannelsA")
    param.setExpression("thisGroup.alpha.get()", False, 0)
    del param
    param = groupAddInput.getParam("which")
    param.setExpression("thisGroup.addInput.get()", False, 0)
    del param
    param = groupRoD.getParam("bbox")
    param.setExpression("3-thisGroup.expRoD.get()", False, 0)
    del param
    param = groupPreview.getParam("which")
    param.setExpression("thisGroup.preview.get()", False, 0)
    del param
    param = groupGlowOnly.getParam("which")
    param.setExpression("thisGroup.glowOnly.get()", False, 0)
    del param
    param = groupRotateIn.getParam("rotate")
    param.setExpression("thisGroup.rotate.get()", False, 0)
    del param
    param = groupRotateOut.getParam("rotate")
    param.setExpression("-thisGroup.rotate.get()", False, 0)
    del param
    param = groupRotateOut.getParam("center")
    param.setExpression("thisGroup.RotateIn.center.get()[dimension]", False, 0)
    param.setExpression("thisGroup.RotateIn.center.get()[dimension]", False, 1)
    del param
    param = groupRotateOutPrev.getParam("rotate")
    param.setExpression("-thisGroup.rotate.get()", False, 0)
    del param
    param = groupRotateOutPrev.getParam("center")
    param.setExpression("thisGroup.RotateIn.center.get()[dimension]", False, 0)
    param.setExpression("thisGroup.RotateIn.center.get()[dimension]", False, 1)
    del param
    param = groupRoD_2.getParam("bbox")
    param.setExpression("3-thisGroup.expRoD.get()", False, 0)
    del param
    param = groupTolerance.getParam("blackPoint")
    param.setExpression("thisGroup.isolateHighlights.get()", False, 0)
    param.setExpression("thisGroup.isolateHighlights.get()", False, 1)
    param.setExpression("thisGroup.isolateHighlights.get()", False, 2)
    param.setExpression("thisGroup.isolateHighlights.get()", False, 3)
    del param
    param = groupMerge4.getParam("disableNode")
    param.setExpression("thisGroup.getInput(1) is None", False, 0)
    del param
    param = groupPostGrade.getParam("NatronOfxParamProcessA")
    param.setExpression("thisGroup.alpha.get()", False, 0)
    del param
    param = groupPostGrade.getParam("MasterSaturation")
    group.getParam("PostGradeMasterSaturation").setAsAlias(param)
    del param
    param = groupPostGrade.getParam("MasterGamma")
    group.getParam("PostGradeMasterGamma").setAsAlias(param)
    del param
    param = groupPostGrade.getParam("MasterGain")
    group.getParam("PostGradeMasterGain").setAsAlias(param)
    del param
    param = groupMerge5.getParam("mix")
    param.setExpression("thisGroup.isolateHue.get()", False, 0)
    del param
    param = groupHSVTool1.getParam("srcColor")
    group.getParam("HSVTool1srcColor").setAsAlias(param)
    del param
    param = groupBloom.getParam("NatronOfxParamProcessA")
    param.setExpression("thisGroup.alpha.get()", False, 0)
    del param
    param = groupBloom.getParam("size")
    param.setExpression("thisGroup.size.get()", False, 0)
    param.setExpression("thisGroup.size.get()*(1-thisGroup.stretch.get())", False, 1)
    del param
    param = groupBloom.getParam("bloomRatio")
    group.getParam("BloombloomRatio").setAsAlias(param)
    del param
    param = groupBloom.getParam("bloomCount")
    param.setExpression("thisGroup.iterations.get()", False, 0)
    del param
    param = groupBloom.getParam("filter")
    group.getParam("Bloomfilter").setAsAlias(param)
    del param
    param = groupBloom.getParam("expandRoD")
    param.setExpression("thisGroup.expRoD.get()", False, 0)
    del param
    param = groupMerge2.getParam("AChannelsA")
    param.setExpression("thisGroup.alpha.get()", False, 0)
    del param
    param = groupscreenSwitch.getParam("which")
    param.setExpression("thisGroup.screen.get()", False, 0)
    del param
    param = groupClampAlpha.getParam("NatronOfxParamProcessA")
    param.setExpression("thisGroup.alpha.get()", False, 0)
    del param

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