예제 #1
0
 def textRAD(self):
     v = self.rgbFactors()
     text = "\n## material conversion from blender \"diffuse_color\" property"
     text += "\nvoid mirror %s" % (formatName(self.id_data.name))
     text += "\n0\n0\n3"
     text += "  %.4f %.4f %.4f\n" % (v[0], v[1], v[2])
     return text
예제 #2
0
 def textRAD(self):
     # Get the roughness and rgb values
     (r,g,b) = self.getMatRGB()
     text = "\n## material conversion from blender \"diffuse_color\" property"
     text += "\nvoid plastic %s"%(formatName(self.id_data.name))
     text += "\n0\n0\n5"
     text += "  %.4f %.4f %.4f %.3f %.3f\n"%(r,g,b,self.specular,self.roughValue())
     return text
 def exportObject(self, obj, matname="ods_default_material"):
     # Get text to write for triangulated face of each object
     text = self.writeTriangles(obj, formatName(matname))
     filename = self.getFilename('objects/%s.rad' % (obj.name))
     self.createFile(filename, text)
     return None