from JascApp import *

def ScriptProperties():
    return {
        'Author': u'renee',
        'Copyright': u'',
        'Description': u''
        }

def Swatch_SetMaterial():
    return {
        'IsPrimary': App.Constants.Boolean.true, 
        'NewMaterial': {
            'Color': None, 
            'Pattern': None, 
            'Gradient': {
                'Name': u'Premier plan - arri\u00E8re-plan', 
                'GradientType': App.Constants.GradientType.Linear, 
                'Angle': 90, 
                'RepeatCount': 1, 
                'RepeatType': App.Constants.RepeatType.Pad, 
                'ColorStops': [{
                    'Color': (81,108,118), 
                    'Location': 0, 
                    'Midpoint': 0.5
                    },{
                    'Color': (138,178,189), 
                    'Location': 1, 
                    'Midpoint': 0.5
                    }], 
                'TransparencyStops': [{
                    'Level': 100, 
                    'Location': 0, 
                    'MidPoint': 0.5
                    },{
                    'Level': 100, 
                    'Location': 1, 
                    'MidPoint': 0.5
                    }], 
                'CenterPoint': None, 
                'FocalPoint': None, 
                'Invert': App.Constants.Boolean.false
                }, 
            'Texture': None
            }
        }

def Do(Environment):
    # SetMaterial
    App.Do( Environment, 'SetMaterial',         Swatch_SetMaterial())

