Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MtoA - Export selected shaders as MaterialX with Python?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
siddhartha.basu
636 Views, 2 Replies

MtoA - Export selected shaders as MaterialX with Python?

Would someone know how to do this?

A simple example would suffice or any documentation would help.

Which one should I use? - the Arnold Python API (any docs?) or the mtoa.core, mtoa.aov, etc (any docs?)

Thanks!

Tags (3)
Labels (3)
2 REPLIES 2
Message 2 of 3

The easiest method would be to use the MtoA arnoldExportToMaterialX Mel command, you can use it in Python like:

import maya.cmds as cmds
cmds.arnoldExportToMaterialX(filename="/path/to/myfile.mtlx", mtl=True)

This command sets that only selected materials should be exported, rather than whole looks.

For each selection it will find the Shading group and export each shader, displacement, volume for each group.



Ashley Handscomb Retallack
Arnold Support Specialist
Arnold Documentation | Arnold Downloads
Message 3 of 3

Yes. It works! Thanks 🙂 Apart from the 'mtl' Flag what are the other flags required? For example, as you've pointed out - exporting looks.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report