diff --git a/README.md b/README.md index db13a05..271a932 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ ### Transform - ** [Shaker_NPG](Transform/Shaker_NPG/README.md)** : add camera shaking effect to the input image +- ** [Shaker](Transform/Shaker/README.md)** : Add a shaking effect to the input image + ## How to install Just download the files and copy them to your pyplug/plugin dir. more info here : diff --git a/Transform/Shaker/README.md b/Transform/Shaker/README.md new file mode 100644 index 0000000..8b8dd15 --- /dev/null +++ b/Transform/Shaker/README.md @@ -0,0 +1,6 @@ +# Shaker_NPG + +Add a shaking effect to the input image. The effect is based on an expression similar to the wiggle expression known from After Effects. +There are also some options to extend the image when you are simulating a camera shake. This can help in some cases where you would have to zoom in a lot. + +Thanks to sergusster for sharing the wiggle expression! diff --git a/Transform/Shaker/Shaker.png b/Transform/Shaker/Shaker.png new file mode 100644 index 0000000..ec63e24 Binary files /dev/null and b/Transform/Shaker/Shaker.png differ diff --git a/Transform/Shaker/Shaker.py b/Transform/Shaker/Shaker.py new file mode 100644 index 0000000..a7fd976 --- /dev/null +++ b/Transform/Shaker/Shaker.py @@ -0,0 +1,1949 @@ +# -*- 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 ShakerExt.py +# See http://natron.readthedocs.org/en/master/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 ShakerExt import * +except ImportError: + pass + +def getPluginID(): + return "PostPollux.Shaker" + +def getLabel(): + return "Shaker" + +def getVersion(): + return 1 + +def getIconPath(): + return "Shaker.png" + +def getGrouping(): + return "Transform" + +def getPluginDescription(): + return "This PyPlug adds a shaking effect to the input image. \nIt\'s based on an expression similar to the \'wiggle\' expression known from After Effects.\n\nIt also supports two methods to extend the image and get rid of the black areas which normally occure while shaking." + +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.createDoubleParam("transAmp", "Translate Amplitude") + param.setMinimum(0, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(500, 0) + param.setDefaultValue(50, 0) + param.restoreDefaultValue(0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("Maximum amount of pixels to offset image while shaking.") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.transAmp = param + del param + + param = lastNode.createDoubleParam("transFreq", "Translation Frequency") + param.setMinimum(0, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(150, 0) + param.setDefaultValue(10, 0) + param.restoreDefaultValue(0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.transFreq = param + del param + + param = lastNode.createSeparatorParam("separator1", "") + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setPersistant(False) + param.setEvaluateOnChange(False) + lastNode.separator1 = param + del param + + param = lastNode.createDoubleParam("rotAmp", "Rotation Amplitude") + param.setMinimum(0, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(45, 0) + param.setDefaultValue(5, 0) + param.restoreDefaultValue(0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("Maximum amount of degrees to rotate the image while shaking.") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.rotAmp = param + del param + + param = lastNode.createDoubleParam("rotFreq", "Rotation Frequency") + param.setMinimum(0, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(150, 0) + param.setDefaultValue(10, 0) + param.restoreDefaultValue(0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.rotFreq = param + del param + + param = lastNode.createSeparatorParam("separator2", "") + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setPersistant(False) + param.setEvaluateOnChange(False) + lastNode.separator2 = param + del param + + param = lastNode.createDoubleParam("scaleAmp", "Scale Amplitude") + param.setMinimum(0, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(1, 0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.scaleAmp = param + del param + + param = lastNode.createDoubleParam("scaleFreq", "Scale Frequency") + param.setMinimum(-2147483648, 0) + param.setMaximum(2147483647, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(150, 0) + param.setDefaultValue(10, 0) + param.restoreDefaultValue(0) + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.scaleFreq = param + del param + + param = lastNode.createSeparatorParam("separator5", "") + + # Add the param to the page + lastNode.controls.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setPersistant(False) + param.setEvaluateOnChange(False) + lastNode.separator5 = 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.createIntParam("seed", "Seed") + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(100, 0) + param.setDefaultValue(0, 0) + param.restoreDefaultValue(0) + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("Change the seed value to get another random shake.") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.seed = param + del param + + param = lastNode.createIntParam("complexity", "Complexity") + param.setMinimum(2, 0) + param.setDisplayMinimum(2, 0) + param.setDisplayMaximum(12, 0) + param.setDefaultValue(8, 0) + param.restoreDefaultValue(0) + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("Defines how many random sine curves are accumulated. The default value of 8 should be ok in most cases. ") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.complexity = param + del param + + param = lastNode.createSeparatorParam("separator3", "") + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setPersistant(False) + param.setEvaluateOnChange(False) + lastNode.separator3 = param + del param + + param = lastNode.createDoubleParam("MotionBlur", "Motion Blur") + param.setMinimum(0, 0) + param.setMaximum(100, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(4, 0) + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.MotionBlur = param + del param + + param = lastNode.createDoubleParam("shutter", "Shutter") + param.setMinimum(0, 0) + param.setMaximum(2, 0) + param.setDisplayMinimum(0, 0) + param.setDisplayMaximum(2, 0) + param.setDefaultValue(0.5, 0) + param.restoreDefaultValue(0) + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.shutter = param + del param + + param = lastNode.createBooleanParam("DirectionalBlur", "Directional Blur Mode") + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.DirectionalBlur = param + del param + + param = lastNode.createSeparatorParam("separator4", "") + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("") + param.setAddNewLine(True) + param.setPersistant(False) + param.setEvaluateOnChange(False) + lastNode.separator4 = param + del param + + param = lastNode.createChoiceParam("imgExt", "Image Extension") + entries = [ ("None", ""), + ("Mirror", ""), + ("Smear", "")] + param.setOptions(entries) + del entries + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("Extend the image to get rid of the black areas with no image information. In some cases this can be used instead of zooming in after a simulated camera shake.") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.imgExt = param + del param + + param = lastNode.createBooleanParam("cropRoD", "Crop RoD") + param.setDefaultValue(True) + param.restoreDefaultValue() + + # Add the param to the group, no need to add it to the page + lastNode.options.addParam(param) + + # Set param properties + param.setHelp("Crops the image to the same as it was before shaking. Parts moving out of the original RoD will be deleted.") + param.setAddNewLine(True) + param.setAnimationEnabled(True) + lastNode.cropRoD = param + del param + + # Refresh the GUI with the newly created parameters + lastNode.setPagesOrder(['controls', 'Node', 'Settings', 'Info']) + lastNode.refreshUserParamsGUI() + del lastNode + + # Start of node "Output1" + lastNode = app.createNode("fr.inria.built-in.Output", 1, group) + lastNode.setScriptName("Output1") + lastNode.setLabel("Output1") + lastNode.setPosition(519, 2689) + lastNode.setSize(104, 43) + 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(505, -241) + lastNode.setSize(104, 31) + lastNode.setColor(0.3, 0.5, 0.2) + groupInput1 = lastNode + + del lastNode + # End of node "Input1" + + # Start of node "Transform1" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Transform1") + lastNode.setLabel("Transform1") + lastNode.setPosition(-1378, 493) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupTransform1 = lastNode + + del lastNode + # End of node "Transform1" + + # Start of node "Mirror_v" + lastNode = app.createNode("net.sf.openfx.Mirror", 1, group) + lastNode.setScriptName("Mirror_v") + lastNode.setLabel("Mirror_v") + lastNode.setPosition(-1910, 597) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupMirror_v = 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_v" + + # Start of node "Merge1" + lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group) + lastNode.setScriptName("Merge1") + lastNode.setLabel("Merge1") + lastNode.setPosition(-1378, 1317) + lastNode.setSize(104, 66) + lastNode.setColor(0.3, 0.37, 0.776) + groupMerge1 = lastNode + + del lastNode + # End of node "Merge1" + + # Start of node "Dot1" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot1") + lastNode.setLabel("Dot1") + lastNode.setPosition(-1333, 611) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot1 = lastNode + + del lastNode + # End of node "Dot1" + + # Start of node "bottom" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom") + lastNode.setLabel("bottom") + lastNode.setPosition(-2130, 742) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-858, 1) + del param + + del lastNode + # End of node "bottom" + + # Start of node "top" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top") + lastNode.setLabel("top") + lastNode.setPosition(-1709, 742) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(858, 1) + del param + + del lastNode + # End of node "top" + + # Start of node "Mirror_h" + lastNode = app.createNode("net.sf.openfx.Mirror", 1, group) + lastNode.setScriptName("Mirror_h") + lastNode.setLabel("Mirror_h") + lastNode.setPosition(-880, 597) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupMirror_h = lastNode + + param = lastNode.getParam("flop") + 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_h" + + # Start of node "left" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("left") + lastNode.setLabel("left") + lastNode.setPosition(-1018, 722) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupleft = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-2048, 0) + del param + + del lastNode + # End of node "left" + + # Start of node "right" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("right") + lastNode.setLabel("right") + lastNode.setPosition(-726, 718) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupright = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + del param + + del lastNode + # End of node "right" + + # Start of node "Mirror_h_2" + lastNode = app.createNode("net.sf.openfx.Mirror", 1, group) + lastNode.setScriptName("Mirror_h_2") + lastNode.setLabel("Mirror_h_2") + lastNode.setPosition(-2130, 887) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupMirror_h_2 = lastNode + + param = lastNode.getParam("flop") + 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_h_2" + + # Start of node "bottom_left" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom_left") + lastNode.setLabel("bottom_left") + lastNode.setPosition(-2226, 1059) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom_left = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-2048, 0) + del param + + del lastNode + # End of node "bottom_left" + + # Start of node "bottom_right" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom_right") + lastNode.setLabel("bottom_right") + lastNode.setPosition(-1983, 1062) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom_right = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + del param + + del lastNode + # End of node "bottom_right" + + # Start of node "Mirror_h_3" + lastNode = app.createNode("net.sf.openfx.Mirror", 1, group) + lastNode.setScriptName("Mirror_h_3") + lastNode.setLabel("Mirror_h_3") + lastNode.setPosition(-1705, 896) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupMirror_h_3 = lastNode + + param = lastNode.getParam("flop") + 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_h_3" + + # Start of node "top_left" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top_left") + lastNode.setLabel("top_left") + lastNode.setPosition(-1790, 1063) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop_left = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-2048, 0) + del param + + del lastNode + # End of node "top_left" + + # Start of node "top_right" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top_right") + lastNode.setLabel("top_right") + lastNode.setPosition(-1609, 1069) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop_right = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + del param + + del lastNode + # End of node "top_right" + + # Start of node "shaking" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("shaking") + lastNode.setLabel("shaking") + lastNode.setPosition(519, 2162) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupshaking = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValueAtTime(-39.12765196283836, 348, 0) + param.setValueAtTime(-24.36035316521001, 348, 1) + del param + + param = lastNode.getParam("rotate") + if param is not None: + param.setValue(-0.6015450781376792, 0) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "shaking" + + # Start of node "crop_rod" + lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group) + lastNode.setScriptName("crop_rod") + lastNode.setLabel("crop_rod") + lastNode.setPosition(519, 2424) + lastNode.setSize(104, 66) + lastNode.setColor(0.3, 0.37, 0.776) + groupcrop_rod = lastNode + + param = lastNode.getParam("bbox") + if param is not None: + param.set("A") + del param + + param = lastNode.getParam("AChannelsR") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("AChannelsG") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("AChannelsB") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("AChannelsA") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("disableNode") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "crop_rod" + + # Start of node "Mirror_Extend" + lastNode = app.createNode("fr.inria.built-in.BackDrop", 1, group) + lastNode.setScriptName("Mirror_Extend") + lastNode.setLabel("Mirror Extend") + lastNode.setPosition(-2374, 326) + lastNode.setSize(1933, 1155) + lastNode.setColor(0.3098, 0.4549, 0.5529) + groupMirror_Extend = lastNode + + del lastNode + # End of node "Mirror_Extend" + + # Start of node "Switch1" + lastNode = app.createNode("net.sf.openfx.switchPlugin", 1, group) + lastNode.setScriptName("Switch1") + lastNode.setLabel("Switch1") + lastNode.setPosition(505, 1731) + lastNode.setSize(104, 43) + lastNode.setColor(0.3, 0.37, 0.776) + groupSwitch1 = lastNode + + param = lastNode.getParam("which") + if param is not None: + param.setValue(0, 0) + del param + + del lastNode + # End of node "Switch1" + + # Start of node "Dot4" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot4") + lastNode.setLabel("Dot4") + lastNode.setPosition(550, 85) + 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(1683, 85) + 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(1697, 1749) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot6 = lastNode + + del lastNode + # End of node "Dot6" + + # Start of node "Dot7" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot7") + lastNode.setLabel("Dot7") + lastNode.setPosition(1697, 2441) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot7 = lastNode + + del lastNode + # End of node "Dot7" + + # Start of node "Crop_bottom" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_bottom") + lastNode.setLabel("Crop_bottom") + lastNode.setPosition(-155, 549) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_bottom = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(2048, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_bottom" + + # Start of node "Scale_smear_v" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_v") + lastNode.setLabel("Scale_smear_v") + lastNode.setPosition(-155, 635) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_v = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("filter") + if param is not None: + param.set("Impulse") + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_v" + + # Start of node "bottom_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom_2") + lastNode.setLabel("bottom_2") + lastNode.setPosition(-155, 717) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(-429, 1) + del param + + del lastNode + # End of node "bottom_2" + + # Start of node "Merge2" + lastNode = app.createNode("net.sf.openfx.MergePlugin", 1, group) + lastNode.setScriptName("Merge2") + lastNode.setLabel("Merge2") + lastNode.setPosition(503, 850) + lastNode.setSize(104, 66) + lastNode.setColor(0.3, 0.37, 0.776) + groupMerge2 = lastNode + + del lastNode + # End of node "Merge2" + + # Start of node "Crop_top" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_top") + lastNode.setLabel("Crop_top") + lastNode.setPosition(24, 550) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_top = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(0, 0) + param.setValue(858, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(2048, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_top" + + # Start of node "Scale_smear_v_2" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_v_2") + lastNode.setLabel("Scale_smear_v_2") + lastNode.setPosition(24, 634) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_v_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_v_2" + + # Start of node "top_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top_2") + lastNode.setLabel("top_2") + lastNode.setPosition(24, 722) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(858, 1) + del param + + del lastNode + # End of node "top_2" + + # Start of node "Crop_left" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_left") + lastNode.setLabel("Crop_left") + lastNode.setPosition(196, 549) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_left = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(858, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_left" + + # Start of node "Scale_smear_h" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h") + lastNode.setLabel("Scale_smear_h") + lastNode.setPosition(196, 636) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h" + + # Start of node "left_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("left_2") + lastNode.setLabel("left_2") + lastNode.setPosition(196, 719) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupleft_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-1024, 0) + param.setValue(0, 1) + del param + + del lastNode + # End of node "left_2" + + # Start of node "Crop_right" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_right") + lastNode.setLabel("Crop_right") + lastNode.setPosition(406, 552) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_right = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(2047, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(858, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_right" + + # Start of node "Scale_smear_h_2" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h_2") + lastNode.setLabel("Scale_smear_h_2") + lastNode.setPosition(406, 635) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h_2" + + # Start of node "right_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("right_2") + lastNode.setLabel("right_2") + lastNode.setPosition(406, 727) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupright_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + param.setValue(0, 1) + del param + + del lastNode + # End of node "right_2" + + # Start of node "Crop_top_left" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_top_left") + lastNode.setLabel("Crop_top_left") + lastNode.setPosition(596, 553) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_top_left = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(0, 0) + param.setValue(858, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_top_left" + + # Start of node "Scale_smear_h_v" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h_v") + lastNode.setLabel("Scale_smear_h_v") + lastNode.setPosition(596, 640) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h_v = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h_v" + + # Start of node "top_left_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top_left_2") + lastNode.setLabel("top_left_2") + lastNode.setPosition(595, 730) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop_left_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-1024, 0) + param.setValue(858, 1) + del param + + del lastNode + # End of node "top_left_2" + + # Start of node "Dot3" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot3") + lastNode.setLabel("Dot3") + lastNode.setPosition(241, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot3 = lastNode + + del lastNode + # End of node "Dot3" + + # Start of node "Dot8" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot8") + lastNode.setLabel("Dot8") + lastNode.setPosition(69, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot8 = lastNode + + del lastNode + # End of node "Dot8" + + # Start of node "Dot9" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot9") + lastNode.setLabel("Dot9") + lastNode.setPosition(-110, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot9 = lastNode + + del lastNode + # End of node "Dot9" + + # Start of node "Dot10" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot10") + lastNode.setLabel("Dot10") + lastNode.setPosition(451, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot10 = lastNode + + del lastNode + # End of node "Dot10" + + # Start of node "Dot11" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot11") + lastNode.setLabel("Dot11") + lastNode.setPosition(641, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot11 = lastNode + + del lastNode + # End of node "Dot11" + + # Start of node "Crop_top_right" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_top_right") + lastNode.setLabel("Crop_top_right") + lastNode.setPosition(803, 550) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_top_right = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(2047, 0) + param.setValue(858, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_top_right" + + # Start of node "Scale_smear_h_v_2" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h_v_2") + lastNode.setLabel("Scale_smear_h_v_2") + lastNode.setPosition(803, 632) + lastNode.setSize(104, 66) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h_v_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h_v_2" + + # Start of node "top_right_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("top_right_2") + lastNode.setLabel("top_right_2") + lastNode.setPosition(803, 730) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + grouptop_right_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + param.setValue(858, 1) + del param + + del lastNode + # End of node "top_right_2" + + # Start of node "Dot12" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot12") + lastNode.setLabel("Dot12") + lastNode.setPosition(848, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot12 = lastNode + + del lastNode + # End of node "Dot12" + + # Start of node "Crop_bottom_left" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_bottom_left") + lastNode.setLabel("Crop_bottom_left") + lastNode.setPosition(1030, 547) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_bottom_left = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_bottom_left" + + # Start of node "Scale_smear_h_v_3" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h_v_3") + lastNode.setLabel("Scale_smear_h_v_3") + lastNode.setPosition(1030, 628) + lastNode.setSize(104, 66) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h_v_3 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h_v_3" + + # Start of node "bottom_left_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom_left_2") + lastNode.setLabel("bottom_left_2") + lastNode.setPosition(1030, 729) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom_left_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(-1024, 0) + param.setValue(-429, 1) + del param + + del lastNode + # End of node "bottom_left_2" + + # Start of node "Dot13" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot13") + lastNode.setLabel("Dot13") + lastNode.setPosition(1075, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot13 = lastNode + + del lastNode + # End of node "Dot13" + + # Start of node "Crop_bottom_right" + lastNode = app.createNode("net.sf.openfx.CropPlugin", 1, group) + lastNode.setScriptName("Crop_bottom_right") + lastNode.setLabel("Crop_bottom_right") + lastNode.setPosition(1237, 532) + lastNode.setSize(104, 66) + lastNode.setColor(0.7, 0.3, 0.1) + groupCrop_bottom_right = lastNode + + param = lastNode.getParam("rectangleInteractEnable") + if param is not None: + param.setValue(False) + del param + + param = lastNode.getParam("bottomLeft") + if param is not None: + param.setValue(2047, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("size") + if param is not None: + param.setValue(1, 0) + param.setValue(1, 1) + del param + + param = lastNode.getParam("reformat") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "Crop_bottom_right" + + # Start of node "Scale_smear_h_v_4" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("Scale_smear_h_v_4") + lastNode.setLabel("Scale_smear_h_v_4") + lastNode.setPosition(1237, 624) + lastNode.setSize(104, 66) + lastNode.setColor(0.7, 0.3, 0.1) + groupScale_smear_h_v_4 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("scale") + if param is not None: + param.setValue(1024, 0) + param.setValue(429, 1) + del param + + param = lastNode.getParam("center") + if param is not None: + param.setValue(0, 0) + param.setValue(0, 1) + del param + + param = lastNode.getParam("black_outside") + if param is not None: + param.setValue(False) + del param + + del lastNode + # End of node "Scale_smear_h_v_4" + + # Start of node "bottom_right_2" + lastNode = app.createNode("net.sf.openfx.Position", 1, group) + lastNode.setScriptName("bottom_right_2") + lastNode.setLabel("bottom_right_2") + lastNode.setPosition(1237, 729) + lastNode.setSize(104, 43) + lastNode.setColor(0.7, 0.3, 0.1) + groupbottom_right_2 = lastNode + + param = lastNode.getParam("translate") + if param is not None: + param.setValue(2048, 0) + param.setValue(-429, 1) + del param + + del lastNode + # End of node "bottom_right_2" + + # Start of node "Dot14" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot14") + lastNode.setLabel("Dot14") + lastNode.setPosition(1282, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot14 = lastNode + + del lastNode + # End of node "Dot14" + + # Start of node "Dot15" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot15") + lastNode.setLabel("Dot15") + lastNode.setPosition(-1337, 85) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot15 = lastNode + + del lastNode + # End of node "Dot15" + + # Start of node "Dot16" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot16") + lastNode.setLabel("Dot16") + lastNode.setPosition(548, 479) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot16 = lastNode + + del lastNode + # End of node "Dot16" + + # Start of node "Smear_Extend" + lastNode = app.createNode("fr.inria.built-in.BackDrop", 1, group) + lastNode.setScriptName("Smear_Extend") + lastNode.setLabel("Smear Extend") + lastNode.setPosition(-312, 322) + lastNode.setSize(1810, 739) + lastNode.setColor(0.45, 0.45, 0.45) + groupSmear_Extend = lastNode + + del lastNode + # End of node "Smear_Extend" + + # Start of node "Dot2" + lastNode = app.createNode("fr.inria.built-in.Dot", 1, group) + lastNode.setScriptName("Dot2") + lastNode.setLabel("Dot2") + lastNode.setPosition(-1333, 1745) + lastNode.setSize(15, 15) + lastNode.setColor(0.7, 0.7, 0.7) + groupDot2 = lastNode + + del lastNode + # End of node "Dot2" + + # Start of node "must_stay_disabled" + lastNode = app.createNode("net.sf.openfx.TransformPlugin", 1, group) + lastNode.setScriptName("must_stay_disabled") + lastNode.setLabel("must_stay_disabled") + lastNode.setPosition(503, 954) + lastNode.setSize(104, 66) + lastNode.setColor(0.7, 0.3, 0.1) + groupmust_stay_disabled = lastNode + + param = lastNode.getParam("disableNode") + if param is not None: + param.setValue(True) + del param + + del lastNode + # End of node "must_stay_disabled" + + # Now that all nodes are created we can connect them together, restore expressions + groupOutput1.connectInput(0, groupcrop_rod) + groupTransform1.connectInput(0, groupDot15) + groupMirror_v.connectInput(0, groupDot1) + groupMerge1.connectInput(0, groupDot1) + groupMerge1.connectInput(1, groupbottom) + groupMerge1.connectInput(3, grouptop) + groupMerge1.connectInput(4, groupleft) + groupMerge1.connectInput(5, groupright) + groupMerge1.connectInput(6, groupbottom_left) + groupMerge1.connectInput(7, groupbottom_right) + groupMerge1.connectInput(8, grouptop_left) + groupMerge1.connectInput(9, grouptop_right) + groupDot1.connectInput(0, groupTransform1) + groupbottom.connectInput(0, groupMirror_v) + grouptop.connectInput(0, groupMirror_v) + groupMirror_h.connectInput(0, groupDot1) + groupleft.connectInput(0, groupMirror_h) + groupright.connectInput(0, groupMirror_h) + groupMirror_h_2.connectInput(0, groupbottom) + groupbottom_left.connectInput(0, groupMirror_h_2) + groupbottom_right.connectInput(0, groupMirror_h_2) + groupMirror_h_3.connectInput(0, grouptop) + grouptop_left.connectInput(0, groupMirror_h_3) + grouptop_right.connectInput(0, groupMirror_h_3) + groupshaking.connectInput(0, groupSwitch1) + groupcrop_rod.connectInput(0, groupshaking) + groupcrop_rod.connectInput(1, groupDot7) + groupSwitch1.connectInput(0, groupDot6) + groupSwitch1.connectInput(1, groupDot2) + groupSwitch1.connectInput(2, groupmust_stay_disabled) + groupDot4.connectInput(0, groupInput1) + groupDot5.connectInput(0, groupDot4) + groupDot6.connectInput(0, groupDot5) + groupDot7.connectInput(0, groupDot6) + groupCrop_bottom.connectInput(0, groupDot9) + groupScale_smear_v.connectInput(0, groupCrop_bottom) + groupbottom_2.connectInput(0, groupScale_smear_v) + groupMerge2.connectInput(0, groupDot16) + groupMerge2.connectInput(1, groupbottom_2) + groupMerge2.connectInput(3, grouptop_2) + groupMerge2.connectInput(4, groupleft_2) + groupMerge2.connectInput(5, groupright_2) + groupMerge2.connectInput(6, grouptop_left_2) + groupMerge2.connectInput(7, grouptop_right_2) + groupMerge2.connectInput(8, groupbottom_left_2) + groupMerge2.connectInput(9, groupbottom_right_2) + groupCrop_top.connectInput(0, groupDot8) + groupScale_smear_v_2.connectInput(0, groupCrop_top) + grouptop_2.connectInput(0, groupScale_smear_v_2) + groupCrop_left.connectInput(0, groupDot3) + groupScale_smear_h.connectInput(0, groupCrop_left) + groupleft_2.connectInput(0, groupScale_smear_h) + groupCrop_right.connectInput(0, groupDot10) + groupScale_smear_h_2.connectInput(0, groupCrop_right) + groupright_2.connectInput(0, groupScale_smear_h_2) + groupCrop_top_left.connectInput(0, groupDot11) + groupScale_smear_h_v.connectInput(0, groupCrop_top_left) + grouptop_left_2.connectInput(0, groupScale_smear_h_v) + groupDot3.connectInput(0, groupDot10) + groupDot8.connectInput(0, groupDot3) + groupDot9.connectInput(0, groupDot8) + groupDot10.connectInput(0, groupDot16) + groupDot11.connectInput(0, groupDot16) + groupCrop_top_right.connectInput(0, groupDot12) + groupScale_smear_h_v_2.connectInput(0, groupCrop_top_right) + grouptop_right_2.connectInput(0, groupScale_smear_h_v_2) + groupDot12.connectInput(0, groupDot11) + groupCrop_bottom_left.connectInput(0, groupDot13) + groupScale_smear_h_v_3.connectInput(0, groupCrop_bottom_left) + groupbottom_left_2.connectInput(0, groupScale_smear_h_v_3) + groupDot13.connectInput(0, groupDot12) + groupCrop_bottom_right.connectInput(0, groupDot14) + groupScale_smear_h_v_4.connectInput(0, groupCrop_bottom_right) + groupbottom_right_2.connectInput(0, groupScale_smear_h_v_4) + groupDot14.connectInput(0, groupDot13) + groupDot15.connectInput(0, groupDot4) + groupDot16.connectInput(0, groupDot4) + groupDot2.connectInput(0, groupMerge1) + groupmust_stay_disabled.connectInput(0, groupMerge2) + + param = groupbottom.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = -rod.height()", True, 1) + del param + param = grouptop.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()", True, 1) + del param + param = groupleft.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = -rod.width()", True, 0) + del param + param = groupright.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()", True, 0) + del param + param = groupbottom_left.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = -rod.width()", True, 0) + del param + param = groupbottom_right.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()", True, 0) + del param + param = grouptop_left.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = -rod.width()", True, 0) + del param + param = grouptop_right.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()", True, 0) + del param + param = groupshaking.getParam("translate") + param.setExpression("frequency = thisGroup.transFreq.get()\namplitude = thisGroup.transAmp.get()\ncomplexity = thisGroup.complexity.get()\nseed = thisGroup.seed.get() + dimension*10\nfps = 24\n\nimport random\nvalue = 0\n\n# Wiggle Expression\nfor x in range(1,complexity):\n\trandom.seed(seed)\n\toffset = random.randint(1,1000)\n\tt = (offset+float(frame))/fps\n\tfactor = 0.8**x\n\tvalue += sin(t*factor*frequency)*amplitude/complexity\nret = value", True, 0) + param.setExpression("frequency = thisGroup.transFreq.get()\namplitude = thisGroup.transAmp.get()\ncomplexity = thisGroup.complexity.get()\nseed = thisGroup.seed.get() + dimension*10\nfps = 24\n\nimport random\nvalue = 0\n\n# Wiggle Expression\nfor x in range(1,complexity):\n\trandom.seed(seed)\n\toffset = random.randint(1,1000)\n\tt = (offset+float(frame))/fps\n\tfactor = 0.8**x\n\tvalue += sin(t*factor*frequency)*amplitude/complexity\nret = value", True, 1) + del param + param = groupshaking.getParam("rotate") + param.setExpression("frequency = thisGroup.rotFreq.get()\namplitude = thisGroup.rotAmp.get()\ncomplexity = thisGroup.complexity.get()\nseed = thisGroup.seed.get() + 5\nfps = 24\n\nimport random\nvalue = 0\n\n# Wiggle Expression\nfor x in range(1,complexity):\n\trandom.seed(seed)\n\toffset = random.randint(1,1000)\n\tt = (offset+float(frame))/fps\n\tfactor = 0.8**x\n\tvalue += sin(t*factor*frequency)*amplitude/complexity\nret = value", True, 0) + del param + param = groupshaking.getParam("scale") + param.setExpression("frequency = thisGroup.scaleFreq.get()\namplitude = thisGroup.scaleAmp.get()\ncomplexity = thisGroup.complexity.get()\nseed = thisGroup.seed.get() + dimension*20\nfps = 24\n\nimport random\nvalue = 0\n\n# Wiggle Expression\nfor x in range(1,complexity):\n\trandom.seed(seed)\n\toffset = random.randint(1,1000)\n\tt = (offset+float(frame))/fps\n\tfactor = 0.8**x\n\tvalue += sin(t*factor*frequency)*amplitude/complexity\nret = 1+ value", True, 0) + param.setExpression("frequency = thisGroup.scaleFreq.get()\namplitude = thisGroup.scaleAmp.get()\ncomplexity = thisGroup.complexity.get()\nseed = thisGroup.seed.get() + dimension*20\nfps = 24\n\nimport random\nvalue = 0\n\n# Wiggle Expression\nfor x in range(1,complexity):\n\trandom.seed(seed)\n\toffset = random.randint(1,1000)\n\tt = (offset+float(frame))/fps\n\tfactor = 0.8**x\n\tvalue += sin(t*factor*frequency)*amplitude/complexity\nret = 1+ value", True, 1) + del param + param = groupshaking.getParam("black_outside") + param.setExpression("if thisGroup.imgExt.get() == 0:\n\tret = True\nelse:\n\tret = False", True, 0) + del param + param = groupshaking.getParam("motionBlur") + group.getParam("MotionBlur").setAsAlias(param) + del param + param = groupshaking.getParam("directionalBlur") + group.getParam("DirectionalBlur").setAsAlias(param) + del param + param = groupshaking.getParam("shutter") + group.getParam("shutter").setAsAlias(param) + del param + param = groupcrop_rod.getParam("disableNode") + param.setExpression("not thisGroup.cropRoD.get()", False, 0) + del param + param = groupSwitch1.getParam("which") + param.setExpression("thisGroup.imgExt.get()", False, 0) + del param + param = groupCrop_bottom.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.left())", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.bottom())", True, 1) + del param + param = groupCrop_bottom.getParam("size") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()", True, 0) + del param + param = groupScale_smear_v.getParam("translate") + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_v.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_v.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = groupbottom_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left()", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() -rod.height()/2", True, 1) + del param + param = groupCrop_top.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.left())", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor(rod.top())", True, 1) + del param + param = groupCrop_top.getParam("size") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()", True, 0) + del param + param = groupScale_smear_v_2.getParam("translate") + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_v_2.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_v_2.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = grouptop_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left()", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() + rod.height()", True, 1) + del param + param = groupCrop_left.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.left())", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.bottom())", True, 1) + del param + param = groupCrop_left.getParam("size") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()", True, 1) + del param + param = groupScale_smear_h.getParam("translate") + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + del param + param = groupScale_smear_h.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = groupleft_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() -rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom()", True, 1) + del param + param = groupCrop_right.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor( rod.left() + rod.width() - 1 )", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.bottom())", True, 1) + del param + param = groupCrop_right.getParam("size") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()", True, 1) + del param + param = groupScale_smear_h_2.getParam("translate") + param.setExpression("ret = 0", False, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h_2.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + del param + param = groupScale_smear_h_2.getParam("center") + param.setExpression("ret = 0 ", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = groupright_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() + rod.width()", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom()", True, 1) + del param + param = groupCrop_top_left.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.left())", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor(rod.top())", True, 1) + del param + param = groupScale_smear_h_v.getParam("translate") + param.setExpression("ret = 0", False, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h_v.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_h_v.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = grouptop_left_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() - rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() + rod.height()", True, 1) + del param + param = groupCrop_top_right.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor( rod.left() + rod.width() - 1)", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor(rod.top())", True, 1) + del param + param = groupScale_smear_h_v_2.getParam("translate") + param.setExpression("ret = 0", False, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h_v_2.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_h_v_2.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = grouptop_right_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() + rod.width()", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() + rod.height()", True, 1) + del param + param = groupCrop_bottom_left.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.left())", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.bottom())", True, 1) + del param + param = groupScale_smear_h_v_3.getParam("translate") + param.setExpression("ret = 0", False, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h_v_3.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_h_v_3.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupbottom_left_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() - rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() - rod.height()/2", True, 1) + del param + param = groupCrop_bottom_right.getParam("bottomLeft") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = floor( rod.left() + rod.width() - 1)", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = ceil(rod.bottom())", True, 1) + del param + param = groupScale_smear_h_v_4.getParam("translate") + param.setExpression("ret = 0", False, 0) + param.setExpression("ret = 0", False, 1) + del param + param = groupScale_smear_h_v_4.getParam("scale") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.width()/2", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.height()/2", True, 1) + del param + param = groupScale_smear_h_v_4.getParam("center") + param.setExpression("ret = 0", True, 0) + param.setExpression("ret = 0", True, 1) + del param + param = groupbottom_right_2.getParam("translate") + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.left() + rod.width()", True, 0) + param.setExpression("rod = thisGroup.Transform1.getRegionOfDefinition(frame, 0)\nret = rod.bottom() - rod.height()/2", True, 1) + del param + + try: + extModule = sys.modules["ShakerExt"] + except KeyError: + extModule = None + if extModule is not None and hasattr(extModule ,"createInstanceExt") and hasattr(extModule.createInstanceExt,"__call__"): + extModule.createInstanceExt(app,group) diff --git a/Transform/Shaker/Shaker.xml b/Transform/Shaker/Shaker.xml new file mode 100644 index 0000000..b99ac89 --- /dev/null +++ b/Transform/Shaker/Shaker.xml @@ -0,0 +1,10 @@ + + + Shaker + + 1.0 + @DATE@ + natron.community.plugins.Shaker + script + +