[Python] export USD with material collection in maya

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    I need to export USD from maya with material collection assigned to objects

    reading usd-maya documentation, I need exportMaterialCollections and according to this ticket resolved, i dont need to setup materialCollectionsPath argument. so i tried :

    cmds.mayaUSDExport( exportMaterialCollections=True, file=usdFilePath, )

    this doesn't work, no collection are created. then :

    cmds.mayaUSDExport( materialCollectionsPath='/Mtl', exportMaterialCollections=True, file=usdFilePath, )

    same result. i tried many variations, without success. The only step forward i've made is with :

    cmds.mayaUSDExport( exportCollectionBasedBindings=True, exportMaterialCollections=True, file=usdFilePath, ) material collections is created with the addition of exportCollectionBasedBindings, but no objects are in the collections

    cmds.mayaUSDExport( exportCollectionBasedBindings=True, exportMaterialCollections=True, file=usdFilePath,materialCollectionsPath='/Mtl' ) gives the same result that the previous, collections exist but empty

    How can I properly export a USD file with material collections assigned ?

    thank you

    Continue reading...

Compartilhe esta Página