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


class AEaiStandardVolumeTemplate(ShaderAETemplate):
    convertToMayaStyle = True
   
    def setup(self):
        self.addSwatch()

        self.beginScrollLayout()
        
        self.beginLayout("体积", collapse=False)
        self.addControl("density",  label="密度", annotation="Volume Density")
        self.addControl("densityChannel", label="密度通道", annotation="Density Channel")
        self.addControl("interpolation", label="插值", annotation="Interpolation")
        self.addControl("displacement", label="移位", annotation="Displacement")
        self.endLayout()

        self.beginLayout("扩散", collapse=False)
        self.addControl("scatter",  label="重量", annotation="Scatter")
        self.addControl("scatterColor", label="扩散颜色", annotation="Scatter Color")
        self.addControl("scatterColorChannel", label="颜色通道", annotation="Scatter Color Channel")
        self.addControl("scatterAnisotropy", label="各向异性", annotation="Scatter Anisotropy")
        self.endLayout()

        self.beginLayout("透明", collapse=False)
        self.addControl("transparent",  label="重量", annotation="Transparent Weight")
        self.addControl("transparentDepth", label="深度", annotation="Transparent Depth")
        self.addControl("transparentChannel", label="通道", annotation="Transparent Channel")
        self.endLayout()

        self.beginLayout("发射", collapse=False)
        self.addControl("emissionMode",  label="模式", annotation="Emission Mode")
        self.addControl("emission", label="重量", annotation="Emission Weight")
        self.addControl("emissionColor", label="颜色", annotation="Emission Color")
        self.addControl("emissionChannel", label="通道", annotation="Emission Channel")

        self.beginLayout("温度", collapse=False)
        self.addControl("temperature",  label="温度", annotation="Temperature")
        self.addControl("temperatureChannel", label="通道", annotation="Temperature Channel")
        self.addControl("blackbodyKelvin", label="黑体辐射", annotation="Blackbody Kelvin")
        self.addControl("blackbodyIntensity", label="黑体强度", annotation="Blackbody Intensity")

        self.endLayout()
        self.endLayout()


        # include/call base class/node attributes
        pm.mel.AEdependNodeTemplate(self.nodeName)

        self.suppress('PhongExponent')
       
        self.addExtraControls()
        self.endScrollLayout()

