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

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

        self.addCustom('message', 'AEshaderTypeNew', 'AEshaderTypeReplace')

        self.addControl("background", label="背景")
        self.addControl("backgroundType", label="背景类型")
        self.addControl("offscreenColor", label="颜色")

        self.beginLayout("阴影", collapse=False)
        self.addControl("shadowColor", label="阴影颜色")
        self.addControl("shadowOpacity", label="阴影不透明度")
        self.addControl("backlighting", label="背光")
        self.addControl("enableTransparency", label="启用透明度")
        self.addControl("shadowTransparency", label="阴影透明度")
        self.endLayout()

        self.beginLayout("漫反射", collapse=True)
        self.addControl("diffuseColor", label="颜色")
        self.addControl("diffuseIntensity", label="强度")
        self.addControl("diffuseUseBackground", label="使用背景")
        self.addControl("indirectDiffuseEnable", label="间接漫反射")
        self.endLayout()

        self.beginLayout("高光", collapse=True)
        self.addControl("specularColor", label="颜色")
        self.addControl("specularIntensity", label="强度")
        self.addControl("specularRoughness", label="粗糙度")
        self.addControl("indirectSpecularEnable", label="间接高光")
        self.endLayout()

        self.beginLayout("AOVs", collapse=True)
        self.addControl("aovShadow", label="阴影")
        self.addControl("aovShadowDiff", label="阴影Diff")
        self.addControl("aovShadowMask", label="阴影遮罩")
        self.addControl("aovIndirectDiffuse", label="间接漫反射")
        self.addControl("aovIndirectSpecular", label="间接高光")

        self.endLayout()

        pm.mel.AEdependNodeTemplate(self.nodeName)

        self.addExtraControls()
        self.endScrollLayout()

