Example #1
0
    def writeTechniques(self, f):
        """
		Write the techniques for the material.
		"""
        mat = self.material
        if (not (mat) and not (self.mesh.vertexColors)
                and not (self.mesh.vertexUV or self.mesh.faceUV)):
            # default material
            DefaultMaterial.writeTechniques(self, f)
        else:
            self.writeRexTechniques(f, mat)
Example #2
0
	def writeTechniques(self, f):
		"""
		Write the techniques for the material.
		"""
		mat = self.material
		if (not(mat)
			and not(self.mesh.vertexColors)
			and not(self.mesh.vertexUV or self.mesh.faceUV)):
			# default material
			DefaultMaterial.writeTechniques(self, f)
		else:
			self.writeRexTechniques(f, mat)
Example #3
0
	def __init__(self, manager, blenderMesh, blenderFace, colouredAmbient):
		GameEngineMaterial.__init__(self, manager, blenderMesh, blenderFace, colouredAmbient)
		self.mesh = blenderMesh
		self.face = blenderFace
		self.colouredAmbient = colouredAmbient
		# check if a Blender material is assigned
		try:
			blenderMaterial = self.mesh.materials[self.face.mat]
		except:
			blenderMaterial = None
		self.fp_parms = {}
		self.vp_parms = {}
		self.alpha = 1.0
		self.shadows = False # doesnt work with rex for now..
		self.material = blenderMaterial
		DefaultMaterial.__init__(self, manager, self._createName())
		self._parseMaterial(blenderMaterial)
		return
Example #4
0
 def __init__(self, manager, blenderMesh, blenderFace, colouredAmbient):
     GameEngineMaterial.__init__(self, manager, blenderMesh, blenderFace,
                                 colouredAmbient)
     self.mesh = blenderMesh
     self.face = blenderFace
     self.colouredAmbient = colouredAmbient
     # check if a Blender material is assigned
     try:
         blenderMaterial = self.mesh.materials[self.face.mat]
     except:
         blenderMaterial = None
     self.fp_parms = {}
     self.vp_parms = {}
     self.alpha = 1.0
     self.shadows = False  # doesnt work with rex for now..
     self.material = blenderMaterial
     DefaultMaterial.__init__(self, manager, self._createName())
     self._parseMaterial(blenderMaterial)
     return