# -*- coding: utf-8 -*-
import pymel.core as pm
from mtoa.ui.ae.shaderTemplate import ShaderAETemplate

class AEaiColorCorrectTemplate(ShaderAETemplate):
    def setup(self):
        self.addSwatch()
        self.beginScrollLayout()

        self.addControl('input', label='输入')
        self.addControl('mask', label='面具')
        self.beginLayout('颜色校正', collapse=False)

        self.addControl('gamma', label='Gamma')
        self.addControl('hueShift', label='色相色调')
        self.addControl('saturation', label='饱和度')
        self.addControl('contrast', label='对比度')
        self.addControl('contrastPivot', label='对比透视')
        self.addControl('exposure', label='曝光')
        self.addControl('multiply', label='相乘')
        self.addControl('add', label='添加')
        self.addControl('invert', label='倒置')
        self.endLayout()

        self.beginLayout('Alpha（阿尔法）', collapse=False)
        self.addControl('alphaIsLuminance', label='亮度')
        self.addControl('alphaMultiply', label='相乘')
        self.addControl('alphaAdd', label='添加')
        self.addControl('invertAlpha', label='倒置')
        self.endLayout()

        pm.mel.AEdependNodeTemplate(self.nodeName)

        self.addExtraControls()
        self.endScrollLayout()

