import maya.mel
from mtoa.ui.ae.shaderTemplate import ShaderAETemplate

class AEapMetalBSDFTemplate(ShaderAETemplate):
    def setup(self):
        self.addSwatch()
        self.beginScrollLayout()
        self.beginLayout("BSDF Attribues", collapse=False)
        self.addControl('weight', label='Weight')
        self.addControl('distribute', label='Distribute', annotation='MICROFACET_BECKMANN or MICROFACET_GGX')
        self.addControl('n_ior', label='N IOR', annotation='Real part of the complex refractive index for Fresnel')
        self.addControl('k_ior', label='K IOR', annotation='Imaginary  part of the complex refractive index for Fresnel')
        self.addControl('roughness_u', label='Roughness U', annotation='Specular roughness along the U direction')
        self.addControl('roughness_v', label='Roughness V', annotation='Specular roughness along the V direction')
        self.addControl('opacity', label='Opacity')
        self.endLayout()
        maya.mel.eval('AEdependNodeTemplate '+self.nodeName)
        self.addExtraControls()
        self.endScrollLayout()
        