def _set_material(prop, value):
    if value not in bpy.data.materials.keys():
        prop['material_id'] = -1
        return
    mat = bpy.data.materials[value]
    fnMat = FnMaterial(mat)
    prop['material_id'] = fnMat.material_id
dataset/ETHPy150Open sugiany/blender_mmd_tools/mmd_tools/properties/morph.py/_set_material/original