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


class AEapCrossBlendTemplate(ShaderAETemplate):
    def setup(self):
        self.addSwatch()
        self.beginScrollLayout()
        self.beginLayout("Material", collapse=False)
        self.addControl('enable', label='Enable',
                        annotation='Enable Shader')
        self.addControl('surface', label='Input Surface',
                        annotation='Input Surface')
        self.addControl('ray_max_length', label='Blend Length',
                        annotation='Blend Length')
        self.addControl('ray_nsamples', label='Ray Samples',
                        annotation='Closest Point Sample Number')
        self.addControl('ray_min_dist', label='Ray Min Dist',
                        annotation='Ray Min Dist')
        self.addControl('ray_max_dist', label='Ray Max Dist',
                        annotation='Ray Max Dist')
        self.addControl('ray_max_depth', label='Ray Max Depth',
                        annotation='Ray Max Depth')
        self.addControl('trace_sets', label='Trace Sets',
                        annotation='Trace Sets for Search Closest Point')
        self.addControl('verbose', label='Verbose',
                        annotation='Verbose')
        self.endLayout()
        maya.mel.eval('AEdependNodeTemplate '+self.nodeName)
        self.addExtraControls()
        self.endScrollLayout()
