Exemplo n.º 1
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "shinymetal"
        self.attributes['Kr'] = ShaderColorAttribute('shinymetalKr')
        self.attributes['Ks'] = ShaderColorAttribute('shinymetalKs')
        self.attributes['uroughness'] = ShaderFloatAttribute(
            'shinymetalURoughness', reciprocal=True)
        self.attributes['vroughness'] = ShaderFloatAttribute(
            'shinymetalVRoughness', reciprocal=True)
Exemplo n.º 2
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "glossy"
        self.attributes['Kd'] = ShaderColorAttribute('glossyKd')
        self.attributes['Ks'] = ShaderColorAttribute('glossyKs')
        self.attributes['uroughness'] = ShaderFloatAttribute(
            'glossyURoughness', reciprocal=True)
        self.attributes['vroughness'] = ShaderFloatAttribute(
            'glossyVRoughness', reciprocal=True)
Exemplo n.º 3
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "glass"
        self.attributes['Kr'] = ShaderColorAttribute('glassKr')
        self.attributes['Kt'] = ShaderColorAttribute('glassKt')
        self.attributes['index'] = ShaderFloatAttribute('glassIndex')
        self.attributes['cauchyb'] = ShaderFloatAttribute('glassCauchyB')
        self.attributes['architectural'] = ShaderBoolAttribute(
            'glassArchitectural')
Exemplo n.º 4
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "metal"
        self.attributes['name'] = ShaderEnumAttribute('metalName',
                                                      self.nameValues)
        #self.attributes['n']            = ShaderColorAttribute('metalN')
        #self.attributes['k']            = ShaderColorAttribute('metalK')
        self.attributes['uroughness'] = ShaderFloatAttribute('metalURoughness',
                                                             reciprocal=True)
        self.attributes['vroughness'] = ShaderFloatAttribute('metalVRoughness',
                                                             reciprocal=True)
Exemplo n.º 5
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "matte"
        self.attributes['Kd'] = ShaderColorAttribute('matteKd')
        self.attributes['sigma'] = ShaderFloatAttribute('matteSigma')
Exemplo n.º 6
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "mattetranslucent"
        self.attributes['Kr'] = ShaderColorAttribute('mattetranslucentKr')
        self.attributes['Kt'] = ShaderColorAttribute('mattetranslucentKt')
        self.attributes['sigma'] = ShaderFloatAttribute(
            'mattetranslucentSigma')
Exemplo n.º 7
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # mix
        namedMaterial1            =    OpenMaya.MObject()    # color
        namedMaterial2            =    OpenMaya.MObject()    # color
        amount                    =    OpenMaya.MObject()    # float
        
        # Export attributes
        self.attributes = {}
        self.luxType = "mix"
        #self.attributes['namedmaterial1'] = ShaderColorAttribute('mixMat1')
        #self.attributes['namedmaterial2'] = ShaderColorAttribute('mixMat2')
        self.attributes['amount']         = ShaderFloatAttribute('mixAmount')
Exemplo n.º 8
0
    def __init__(self):
        """
        lambertShader constructor. Calls the parent OpenMayaMPx.MPxNode constructor
        and defines the Maya attribute -> lux material parameter mapping.
        """
        
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for shader
        self.attributes = {}
        self.luxType = "matte"
        self.attributes['Kd']    = ShaderColorAttribute('color')
        self.attributes['sigma'] = ShaderFloatAttribute('translucence')
         
Exemplo n.º 9
0
    def __init__(self):
        """
        phongShader constructor. Calls the parent OpenMayaMPx.MPxNode constructor
        and defines the Maya attribute -> lux material parameter mapping.
        """

        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for shader
        self.attributes = {}
        self.luxType = "glossy"
        self.attributes['Kd'] = ShaderColorAttribute('color')
        self.attributes['Ks'] = ShaderColorAttribute('specularColor')
        self.attributes['uroughness'] = ShaderFloatAttribute('cosinePower',
                                                             preScale=0.01,
                                                             invert=True,
                                                             reciprocal=True,
                                                             postScale=0.1)
        self.attributes['vroughness'] = ShaderFloatAttribute('cosinePower',
                                                             preScale=0.01,
                                                             invert=True,
                                                             reciprocal=True,
                                                             postScale=0.1)
Exemplo n.º 10
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # Export attributes
        self.attributes = {}
        self.luxType = "carpaint"
        self.attributes['name'] = ShaderEnumAttribute('carpaintName', self.nameValues)
        self.attributes['Kd']   = ShaderColorAttribute('carpaintKd')
        self.attributes['Ks1']  = ShaderColorAttribute('carpaintKs1')
        self.attributes['Ks2']  = ShaderColorAttribute('carpaintKs2')
        self.attributes['Ks3']  = ShaderColorAttribute('carpaintKs3')
        self.attributes['R1']   = ShaderFloatAttribute('carpaintR1')
        self.attributes['R2']   = ShaderFloatAttribute('carpaintR2')
        self.attributes['R3']   = ShaderFloatAttribute('carpaintR3')
        self.attributes['M1']   = ShaderFloatAttribute('carpaintM1')
        self.attributes['M2']   = ShaderFloatAttribute('carpaintM2')
        self.attributes['M3']   = ShaderFloatAttribute('carpaintM3')