Maya导出FBX后,FBX导入UE4的材质顺序

Maya导出FBX后,FBX导入UE4的材质顺序

参考连接:Solved: Manage materials order - Autodesk Community - Maya

objMaterials = []

objs = cmds.ls(sl=True)
allFaces = cmds.polyEvaluate(objs,f=True)
for obj in objs:
      print faces
      for face in range(allFaces):
          #print face
          iteFace = obj+".f["+str(face)+"]"
          print(iteFace)
          cmds.select(iteFace)
          cmds.hyperShade(smn=True)
          material = cmds.ls(sl=True)
          #print material[0]
          if not material[0] in objMaterials:
              objMaterials.append(material[0])

注意:如果物体面数多,速度会有点慢

未经博主允许,禁止直接转载本博客任何内容(可以在文章中添加链接,禁止原文照搬),如需直接原文转载对应文章,请在该文章中留言联系博主,谢谢!!
原文地址:https://www.cnblogs.com/ibingshan/p/14685914.html