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

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

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

        self.beginLayout('环境闭塞属性', collapse=False)
        self.addControl('samples', label='采样')
        self.addControl('spread', label='扩散')
        self.addControl('falloff', label='衰减')
        self.addControl('near_clip', label='近剪辑')
        self.addControl('far_clip', label='远剪辑')
        self.addSeparator()
        self.addControl('white', label='白色')
        self.addControl('black', label='黑色')        
        self.addControl('opacity', label='不透明度')       
        self.addSeparator()
        self.beginNoOptimize()
        self.addControl('invertNormals', label='反转法线')
        self.addControl('selfOnly', label='自身')
        self.endNoOptimize()
        self.addControl('normalCamera', label='常规')
        self.endLayout()

        pm.mel.AEdependNodeTemplate(self.nodeName)

        self.addExtraControls()
        self.endScrollLayout()

