[Arnold] Naming to get MtoA shader AE Template working.

[Nuke] Despill expressions.
January 14, 2015
Show all

[Arnold] Naming to get MtoA shader AE Template working.

I am no expert in this, but if you are following every step along the way creating your first custom Arnold shader, but you just can’t seem to  get your Mtoa shader AE template working in Maya (like I did). Here are some key points you can start checking in terms of naming things correctly.

1. for the .mtd file.  the name needs to match the .so file:

<arnold_shader_name>.so
<arnold_shader_name>.mtd

 

2. inside the .mtd file is where the <maya_node_name> gets defined,
this name can be different from the <arnold_node_name> ( which is defined in the .cpp file):

[node <arnold_node_name>]
    maya.name STRING "<maya_node_name>"
    maya.id INT 0x00000000
    ...

 

3. for the AE template file, the file name needs to be “<maya_node_name>Template.py”:

<maya_node_name>Template.py

 

4. finally, in the template .py file, when defining the AE template class,
the name of the class needs to be “AE<maya_node_name>Template”:

class  AE<maya_node_name>Template(ShaderAETemplate):
    def setup(self):
        self.addSwatch()
        self.beginScrollLayout()
        ...

if everything is named correctly and installed properly, the AE Template should be working.

 

For more refer to the Arnold page on creating your first shader:
https://support.solidangle.com/display/mayatut/Creating+a+shader

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *