from PSPApp import *

def ScriptProperties():
    return {
        'Author': 'Angela M. Cable',
        'Copyright': '2002, for free distribution only',
        'Description': "An impressionist effect, works best on images with not much detail",
        'Host': 'Paint Shop Pro',
        'Host Version': '8.00'
        }

def Do(Environment):
    App.Do( Environment, 'LayerDuplicate', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default
                }
            })

    App.Do( Environment, 'SelectLayer', {
            'Path': (0,-1,[],App.Constants.Boolean.false), 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent
                }
            })

    App.Do( Environment, 'UserDefinedFilter', {
            'ApplyToRed': App.Constants.Boolean.true, 
            'Bias': 0, 
            'ApplyToGreen': App.Constants.Boolean.true, 
            'Divisor': 1, 
            'ApplyToGrey': App.Constants.Boolean.false, 
            'ApplyToBlue': App.Constants.Boolean.true, 
            'Kernel': ((0,0,0,0,0,0,0),(0,0,0,0,0,0,0),(0,0,2,1,0,0,0),(0,0,1,1
                ,-1,0,0),(0,0,0,-1,-2,0,0),(0,0,0,0,0,0,0),(0,0,0,0,0,0,0)), 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'PreviewVisible': App.Constants.Boolean.true, 
                'AutoProof': App.Constants.Boolean.false
                }
            })

    App.Do( Environment, 'SelectLayer', {
            'Path': (0,1,[],App.Constants.Boolean.false), 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent
                }
            })

    App.Do( Environment, 'BrushStrokes', {
            'Angle': 177, 
            'Bristles': 256, 
            'Color': (0,0,0), 
            'Density': 17, 
            'Length': 18, 
            'Opacity': 100, 
            'Softness': 9, 
            'Width': 6, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'PreviewVisible': App.Constants.Boolean.true, 
                'AutoProof': App.Constants.Boolean.false
                }
            })

    App.Do( Environment, 'LayerDuplicate', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default
                }
            })

    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': App.Constants.BlendMode.Darken
                }, 
            'BlendRanges': None, 
            'Path': (0,-1,[],App.Constants.Boolean.false), 
            'BrightnessContrast': None, 
            'ChannelMixer': None, 
            'ColorBalance': None, 
            'CurveParams': None, 
            'HSL': None, 
            'Threshold': None, 
            'Levels': None, 
            'Posterize': None, 
            'Mask': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'PreviewVisible': App.Constants.Boolean.true, 
                'AutoProof': App.Constants.Boolean.false
                }
            })

    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': App.Constants.BlendMode.Multiply
                }, 
            'BlendRanges': None, 
            'Path': (0,0,[],App.Constants.Boolean.false), 
            'BrightnessContrast': None, 
            'ChannelMixer': None, 
            'ColorBalance': None, 
            'CurveParams': None, 
            'HSL': None, 
            'Threshold': None, 
            'Levels': None, 
            'Posterize': None, 
            'Mask': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'PreviewVisible': App.Constants.Boolean.true, 
                'AutoProof': App.Constants.Boolean.false
                }
            })

