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

        # translation table for texture
        self.attributes = {}

        self.attributes['flipxy'] = TextureBoolAttribute(
            'flipxy', self.addToOutput, self.prependToOutput)

        self.attributes['type'] = TextureEnumAttribute('type',
                                                       self.addToOutput,
                                                       self.prependToOutput,
                                                       asString=True,
                                                       nameValues=self.aTypes)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute(
            'scale', self.addToOutput, self.prependToOutput)

        self.attributes['bright'] = TextureFloatAttribute(
            'bright', self.addToOutput, self.prependToOutput)
        self.attributes['contrast'] = TextureFloatAttribute(
            'contrast', self.addToOutput, self.prependToOutput)

        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)
Esempio n. 2
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['noisedepth'] = TextureFloatAttribute(
            'noisedepth', self.addToOutput, self.prependToOutput)
        self.attributes['turbulance'] = TextureFloatAttribute(
            'turbulance', self.addToOutput, self.prependToOutput)

        self.attributes['bright'] = TextureFloatAttribute(
            'bright', self.addToOutput, self.prependToOutput)
        self.attributes['contrast'] = TextureFloatAttribute(
            'contrast', self.addToOutput, self.prependToOutput)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute(
            'scale', self.addToOutput, self.prependToOutput)

        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)
Esempio n. 3
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}
        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)

        self.attributes['aamode'] = TextureEnumAttribute(
            'aamode',
            self.addToOutput,
            self.prependToOutput,
            asString=True,
            nameValues=self.aAAModes)

        self.attributes['uscale'] = TextureFloatAttribute(
            'uscale', self.addToOutput, self.prependToOutput)
        self.attributes['vscale'] = TextureFloatAttribute(
            'vscale', self.addToOutput, self.prependToOutput)

        self.attributes['udelta'] = TextureFloatAttribute(
            'udelta', self.addToOutput, self.prependToOutput)
        self.attributes['vdelta'] = TextureFloatAttribute(
            'vdelta', self.addToOutput, self.prependToOutput)

        self.attributes['mapping'] = TextureEnumAttribute(
            'mapping',
            self.addToOutput,
            self.prependToOutput,
            asString=True,
            nameValues=self.aMappings)
Esempio n. 4
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['brickwidth'] = TextureFloatAttribute(
            'brickwidth', self.addToOutput, self.prependToOutput)
        self.attributes['brickheight'] = TextureFloatAttribute(
            'brickheight', self.addToOutput, self.prependToOutput)
        self.attributes['brickdepth'] = TextureFloatAttribute(
            'brickdepth', self.addToOutput, self.prependToOutput)
        self.attributes['mortarsize'] = TextureFloatAttribute(
            'mortarsize', self.addToOutput, self.prependToOutput)

        self.attributes['bricktex'] = TextureColorAttribute(
            'bricktex', self.addToOutput, self.prependToOutput)
        self.attributes['mortartex'] = TextureColorAttribute(
            'mortartex', self.addToOutput, self.prependToOutput)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute(
            'scale', self.addToOutput, self.prependToOutput)
Esempio n. 5
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['frequency']  = TextureFloatAttribute('frequency',  self.addToOutput, self.prependToOutput)
        self.attributes['phase']      = TextureFloatAttribute('phase',  self.addToOutput, self.prependToOutput)
        self.attributes['energy']     = TextureFloatAttribute('energy',  self.addToOutput, self.prependToOutput)
Esempio n. 6
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['wavelength'] = TextureFloatAttribute(
            'wavelength', self.addToOutput, self.prependToOutput)
        self.attributes['width'] = TextureFloatAttribute(
            'width', self.addToOutput, self.prependToOutput)
        self.attributes['energy'] = TextureFloatAttribute(
            'energy', self.addToOutput, self.prependToOutput)
Esempio n. 7
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['temperature']  = TextureFloatAttribute('temperature',  self.addToOutput, self.prependToOutput)
Esempio n. 8
0
    def __init__(self):

        self.attributes = {}
        self.attributes['tex1'] = TextureFloatAttribute(
            'bumpValue', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureFloatAttribute(
            'bumpDepth', self.addToOutput, self.prependToOutput)


#    def getTexture(self, plugName, shaderNode, shaderName, attrType ):
#        bumpPlug = shaderNode.findPlug('bumpValue')
#        dgIt = OpenMaya.MItDependencyGraph( bumpPlug,
#                                            OpenMaya.MFn.kFileTexture,
#                                            OpenMaya.MItDependencyGraph.kUpstream,
#                                            OpenMaya.MItDependencyGraph.kBreadthFirst,
#                                            OpenMaya.MItDependencyGraph.kNodeLevel
#                                            )
#
#        dgIt.disablePruningOnFilter()
#
#        if not dgIt.isDone():
#            hasBumpMap = True
#
#            textureNode = dgIt.thisNode()
#            fnTextureNode = OpenMaya.MFnDependencyNode(textureNode)
#            filenamePlug = fnTextureNode.findPlug('fileTextureName')
#            bumpImage = filenamePlug.asString()
#
#            colorgainPlug = shaderNode.findPlug( 'bumpDepth' )
#            #colorgainPlug = fnTextureNode.findPlug('colorGainR')
#            bumpScale = colorgainPlug.asFloat()
#
#            self.addToOutput( 'Texture "' + shaderName + '.normalCamera.scale"' )
#            self.addToOutput( '\t"float" "constant"' )
#            self.addToOutput( ( '\t\t"float value" [%f]' % bumpScale ) )
#
#            self.addToOutput( 'Texture "' + shaderName + '.normalCamera.image"' )
#            self.addToOutput( '\t"float" "imagemap"' )
#            self.addToOutput( '\t\t"float vscale" [-1.0]' )
#            self.addToOutput( ( '\t\t"string filename" ["%s"]' % FileCollector.collectBumpmap( bumpImage ) ) )
#
#            self.addToOutput( 'Texture "' + shaderName + '.normalCamera"' )
#            self.addToOutput( '\t"float" "scale"' )
#            self.addToOutput( ( '\t\t"texture tex1" ["%s.normalCamera.scale"]' % shaderName ) )
#            self.addToOutput( ( '\t\t"texture tex2" ["%s.normalCamera.image"]' % shaderName ) )
#
#        return self.outputString
Esempio n. 9
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['distmetric'] = TextureEnumAttribute(
            'distmetric',
            self.addToOutput,
            self.prependToOutput,
            asString=True,
            nameValues=self.aDistmetrics)

        self.attributes['minkovsky_exp'] = TextureFloatAttribute(
            'minkovsky_exp', self.addToOutput, self.prependToOutput)
        self.attributes['outscale'] = TextureFloatAttribute(
            'outscale', self.addToOutput, self.prependToOutput)
        self.attributes['noisesize'] = TextureFloatAttribute(
            'noisesize', self.addToOutput, self.prependToOutput)
        self.attributes['nabla'] = TextureFloatAttribute(
            'nabla', self.addToOutput, self.prependToOutput)
        self.attributes['w1'] = TextureFloatAttribute('w1', self.addToOutput,
                                                      self.prependToOutput)
        self.attributes['w2'] = TextureFloatAttribute('w2', self.addToOutput,
                                                      self.prependToOutput)
        self.attributes['w3'] = TextureFloatAttribute('w3', self.addToOutput,
                                                      self.prependToOutput)
        self.attributes['w4'] = TextureFloatAttribute('w4', self.addToOutput,
                                                      self.prependToOutput)

        self.attributes['bright'] = TextureFloatAttribute(
            'bright', self.addToOutput, self.prependToOutput)
        self.attributes['contrast'] = TextureFloatAttribute(
            'contrast', self.addToOutput, self.prependToOutput)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute(
            'scale', self.addToOutput, self.prependToOutput)

        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)
Esempio n. 10
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}
        self.attributes['octaves'] = TextureIntegerAttribute(
            'octaves', self.addToOutput, self.prependToOutput)
        self.attributes['roughness'] = TextureFloatAttribute(
            'roughness', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureFloatAttribute(
            'scale', self.addToOutput, self.prependToOutput)
        self.attributes['variation'] = TextureFloatAttribute(
            'variation', self.addToOutput, self.prependToOutput)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
Esempio n. 11
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}
        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)
        self.attributes['amount'] = TextureFloatAttribute(
            'amount', self.addToOutput, self.prependToOutput)
Esempio n. 12
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}
        self.attributes['h'] = TextureFloatAttribute('h', self.addToOutput,
                                                     self.prependToOutput)
        self.attributes['lacu'] = TextureFloatAttribute(
            'lacu', self.addToOutput, self.prependToOutput)
        self.attributes['octs'] = TextureFloatAttribute(
            'octs', self.addToOutput, self.prependToOutput)
        self.attributes['gain'] = TextureFloatAttribute(
            'gain', self.addToOutput, self.prependToOutput)
        self.attributes['offset'] = TextureFloatAttribute(
            'offset', self.addToOutput, self.prependToOutput)
        self.attributes['noisesize'] = TextureFloatAttribute(
            'noisesize', self.addToOutput, self.prependToOutput)
        self.attributes['outscale'] = TextureFloatAttribute(
            'outscale', self.addToOutput, self.prependToOutput)
        self.attributes['type'] = TextureEnumAttribute('type',
                                                       self.addToOutput,
                                                       self.prependToOutput,
                                                       asString=True,
                                                       nameValues=self.aTypes)
        self.attributes['noisebasis'] = TextureEnumAttribute(
            'noisebasis',
            self.addToOutput,
            self.prependToOutput,
            asString=True,
            nameValues=self.aNoises)
        self.attributes['bright'] = TextureFloatAttribute(
            'bright', self.addToOutput, self.prependToOutput)
        self.attributes['contrast'] = TextureFloatAttribute(
            'contrast', self.addToOutput, self.prependToOutput)

        self.attributes['tex1'] = TextureColorAttribute(
            'tex1', self.addToOutput, self.prependToOutput)
        self.attributes['tex2'] = TextureColorAttribute(
            'tex2', self.addToOutput, self.prependToOutput)

        self.attributes['translate'] = TextureVectorAttribute(
            'translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute(
            'rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute(
            'scale', self.addToOutput, self.prependToOutput)
Esempio n. 13
0
    def __init__(self):
        OpenMayaMPx.MPxNode.__init__(self)

        # translation table for texture
        self.attributes = {}

        self.attributes['noisesize']  = TextureFloatAttribute('noisesize',  self.addToOutput, self.prependToOutput)
        self.attributes['noisedepth']  = TextureIntegerAttribute('noisedepth',  self.addToOutput, self.prependToOutput)
        self.attributes['turbulance']  = TextureFloatAttribute('turbulance',  self.addToOutput, self.prependToOutput)
        self.attributes['type']       = TextureEnumAttribute('type',  self.addToOutput, self.prependToOutput, asString = True, nameValues = self.aTypes)
        self.attributes['noisetype']  = TextureEnumAttribute('noisetype',  self.addToOutput, self.prependToOutput, asString = True, nameValues = self.aNoiseTypes)
        self.attributes['noisebasis'] = TextureEnumAttribute('noisebasis',  self.addToOutput, self.prependToOutput, asString = True, nameValues = self.aNoises)
        self.attributes['noisebasis2'] = TextureEnumAttribute('noisebasis2',  self.addToOutput, self.prependToOutput, asString = True, nameValues = self.aNoises2)
        self.attributes['bright']     = TextureFloatAttribute('bright',  self.addToOutput, self.prependToOutput)
        self.attributes['contrast']   = TextureFloatAttribute('contrast',  self.addToOutput, self.prependToOutput)
        
        self.attributes['translate'] = TextureVectorAttribute('translate', self.addToOutput, self.prependToOutput)
        self.attributes['rotate'] = TextureVectorAttribute('rotate', self.addToOutput, self.prependToOutput)
        self.attributes['scale'] = TextureVectorAttribute('scale', self.addToOutput, self.prependToOutput)
        
        self.attributes['tex1']   = TextureColorAttribute('tex1',  self.addToOutput, self.prependToOutput)
        self.attributes['tex2']   = TextureColorAttribute('tex2',  self.addToOutput, self.prependToOutput)