I need a python script for automating the rendering of sprite frame PNGs from a model and associated animations in Autodesk Maya. The program should receive 1 input parameter, which is a configuration file in JSON format and should be runnable from the command line on Mac OSX. For example > python myscript ~/config.json. The script MUST be compatible with Maya 2013 x64.
The script should read the JSON file, receive a number of parameters and then run one or more batch render jobs based on the input.
The configuration file should contain the following inputs and should be use objects for grouping associated properties.
fbxDirectory - Directory containing the fbx files for a scene
sceneDirectory - If fbxDirectory is specified, then this parameter is the directory where the assembled scene .mb file should be saved. If fbxDirectory is NOT specified, then this is the directory where the .mb file to loaded from.
fbxFiles - an array of FBX filenames which will be loaded.
mbFiles - a single mb filename which will be loaded. If mbFiles and fbxFiles are both specified, then the fbxFiles should be loaded into the scene in question and saved.
cameraPosition - The x,y,z position of the camera. Format cameraPosition:{x:x,y:y,z:z}
cameraAngle - The angle the camera should point.
pngOutputDir - A full path to the directory where rendered PNG files should be saved
animationsToRender - an array of the animations that should be rendered
From there, the JSON file should contain objects representing ALL of the settings in the maya Render Settings dialog for Common, Maya Software, Maya Hardware, Maya Hardware 2.0, Maya Vector and Mental Ray tabs. This should include Render Layer and all settings under the aforementioned tabs.
For example the JSON could contain:
{
renderSettings:{
renderLayer:'masterLayer',
renderUsing:{
name:'MayaSoftware',
settings:{
ColorManagement:{
EnableColorManagement:true,
DefaultInputProfile:'sRGB',
DefaultOutputProfile:'Linear sRGB'
}
}
//ETC, ETC for all available settings
}
}
}