material.diffuse_color=[m.color.r, m.color.g, m.color.b]
material.alpha=m.color.a
material.diffuse_intensity=m.diffuse
- # temporary
- material.emit=1.0
return material
def createPmdMaterial(m):
material.specular_color=([m.specular.r, m.specular.g, m.specular.b])
material.mirror_color=([m.ambient.r, m.ambient.g, m.ambient.b])
material.subsurface_scattering.enabled=True if m.flag==1 else False
- # temporary
- material.emit=1.0
return material
def createTexture(path):
def objectMakeParent(parent, child):
child.parent=parent
+def objectAddMirrorModifier(mesh_object):
+ return mesh_object.modifiers.new("Modifier", "MIRROR")
def meshAddMqoGeometry(mesh_object, o, materials, imageMap, scale):
mesh=mesh_object.data
def VtoV(v):
return mathutils.Vector([v.x, v.y, v.z])
+def meshSetSmooth(mesh, smoothing):
+ mesh.autosmooth_angle=int(smoothing)
+ mesh.autosmooth=True
+ mesh.calc_normals()
+