|
import pymel.core as pm
import mtoa.utils as utils
import mtoa.ui.ae.utils as aeUtils
from mtoa.ui.ae.shaderTemplate import ShaderAETemplate
# Note the name of the class must be AE<shader_name>Template
class AEmkPatternTemplate(ShaderAETemplate):
def setup(self):
# Add the shader swatch to the AE
self.addSwatch()
self.beginScrollLayout()
# Add a list that allows to replace the shader for other one
self.addCustom('message', 'AEshaderTypeNew', 'AEshaderTypeReplace')
self.beginLayout("Colors", collapse=False)
self.addControl("baseColor", label="BaseColor", annotation="")
self.addControl("patternColor", label="PatternColor", annotation="")
self.endLayout()
self.beginLayout("Pattern Controls", collapse=False)
self.addControl("offset", label="Offset", annotation="")
self.addControl("mode", label="Mode", annotation="")
self.addControl("radius", label="Radius", annotation="")
self.addControl("uCenter", label="UCenter", annotation="")
self.addControl("vCenter", label="VCenter", annotation="")
self.endLayout()
self.beginLayout("UV Controls", collapse=True)
self.addControl("uvCoord", label="UvCoord", annotation="")
self.addControl("useUVCoord", label="UseUVCoord", annotation="")
self.endLayout()
# include/call base class/node attributes
pm.mel.AEdependNodeTemplate(self.nodeName)
# Add Section for the extra controls not displayed before
self.addExtraControls()
self.endScrollLayout()
|