Hi,
Is there a way to extract shader name from the AOV node with Python? I'd like to get 'cryptomatte' when I know AOV's node name ('crypto_asset' for example). I tried a listAttr on that AOV's node name but couldn't find any one related to the shader name.
Thank you!
MtoA automatically adds the cryptomatte aov shader when it sees the cryptomatte node (because the cryptomatte node has the aov_shader TRUE metadata in plug-ins\mtoa.mtd)
The shader name is automatically generated.
Thank you Stephen. But what I'm trying to do is to find the name of the shader connected to an AOV (and, BTW, not especially cryptomattes). So, I have a node's name ('crypto_asset') and I'd like to find the shader called 'cryptomatte' that is connected to it...
For other AOVs, MtoA inserts an aov write node.
So for example, if you create an AOV named "ao" and assign an aiAmbientOcclusion shader to it, then when MtoA translates the scene, MtoA inserts an aov_write_rgba node.
The node is named defaultArnoldRenderOptions/aov_write_rgba_ao
So if you know the type and name of the AOV, you could build the shader name.
That node never exists in Maya. It exists only in the data that MtoA sends to Arnold.
Ok. Sorry Stephen but I'm a bit lost then, there's no real documentation about Python commands for managing MtoA... How can we concretely ask aov_write_rgba node to give us its shader's name thanks to Python?