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

class AEapSurfaceSampleTemplate(ShaderAETemplate):
    def setup(self):
        self.addSwatch()
        self.beginScrollLayout()
        
        self.beginLayout("Color", collapse=False)
        self.addControl('default_color', label='Default Color', annotation='Default Color')
        self.endLayout()

        self.beginLayout("Sample", collapse=False)
        self.addControl('sample_direction', label='Sample Direction', annotation='Sample Direction')
        self.addControl('custom_direction', label='Custom Direction', annotation='Custom Direction')
        self.endLayout()

        self.beginLayout("Output", collapse=False)
        self.addControl('sample_data_type', label='Sample Data Type', annotation='Sample Data Type')
        self.beginNoOptimize()
        self.addControl('space', label='Space', annotation='Normalize Output Vector')
        self.addControl('normalize', label='Normalize', annotation='Normalize Output Vector')
        self.addControl('invert', label='Invert', annotation='Invert Output Vector')
        self.endNoOptimize()
        self.endLayout()

        self.beginLayout("Render", collapse=False)
        self.addControl('trace_sets', label='Trace Sets', annotation='Trace Sets')
        self.addControl('inclusive', label='Inclusive', annotation='Inclusive')
        self.endLayout()

        maya.mel.eval('AEdependNodeTemplate '+self.nodeName)

        self.addExtraControls()
        self.endScrollLayout()
        
