maya2katana
Easily copy shading nodes from Maya to Katana
Currently supported renderers:
-
Arnold 5 (bate)
Supported nodes: aiStandardSurface, aiStandardHair, aiNormalMap, aiColorCorrect, aiBump2d, aiImage, aiMultiply, aiDivide, aiPow, aiLayerShader, aiSpaceTransform, aiClamp, file, ramp, bump2d, multiplyDivide, blendColors, clamp
Installation
-
Quit Maya
-
Clone maya2katana repository (or download zip, extract and rename directory from "maya2katana-master" to "maya2katana") and place it to:
Windows: \Users\<username>\Documents\maya\scripts
Linux: ~/maya/scripts
- Open Script Editor and paste the following code to Python tab:
import maya2katana
reload (maya2katana)
maya2katana.copy()
- To create a shelf button select the code and middle-mouse-drag it to your shelf
Usage
-
Select a shading network or a single shadingEngine (Shading Group) node
-
Press the button you've created earlier or execute a script (see installation step)
Integrations
To get the XML from shading network name:
import maya2katana
reload (maya2katana)
node_name = 'materialSG'
# Get the xml as string
resulting_xml = maya2katana.generate_xml(node_name)
You can save the resulting XML to file and bring it into Katana:
# Now create the Katana shading network
# Suppose the XML (string) is already loaded
# to 'resulting_xml' string variable
from Katana import NodegraphAPI, KatanaFile
# Create a group for shading network
group_name = 'materialSG'
group_node = NodegraphAPI.CreateNode(group_name, NodegraphAPI.GetRootNode())
# Bring the nodes to Katana scene
# and place them inside the newly created group
nodes = KatanaFile.Paste(resulting_xml, group_node)
Arnold 5 escription
Incompatible with "Arnold 4" (与"Arnold 4"不兼容)
May be incompatible with "RenderMan" (可能与"RenderMan"不兼容)
Using Maya node requires setting up the renderer (使用Maya节点需要设置渲染器)
Description currently: (当前说明)
- The texture path will be converted to a ".tx" path (纹理路径将转换为".tx"路径)
- Maya File to aiImage (Maya文件转为aiImage) Supported attributes (支持的属性): Image Name, Color Space, Color Gain, Color Offset
- aiImage add Color Space support
- Maya Ramp to Arnold Ramp_RGB (Maya渐变转为阿诺德渐变)
- Maya BlendColors to Arnold Mix_RGBA (Maya颜色混合转为阿诺德混合颜色)