Message 1 of 1
MEL script for Multi-region rendering?

Not applicable
10-22-2012
04:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Need help with what should be a fairly simple MEL script.
What i am trying to do
Create a script that can be called via command line (-preRender xxx.mel)
Script needs to define 9 regions of the frame and render
I know you can region render via command line using the "-reg xx xx xx xx" command, but this only renders one region per frame. I need 9 regions on the same frame.
So frame 1 has only 9 small regions of it rendered.
Any idea how to do this?
I have been looking and tryin to figure things out so far...
This is what i got
This will render a two regions in the GUI (by executing code from scriptEditor only)!
But now if i take that code and put it into a proc...
Then add the "renderA;" into Maya's Pre Render, it causes Maya to crash. EVERYTIME.
What am i doing wrong/missing to get this to work sucessfully as a MEL script that can be run from command line?
Any help is appreciated.
Mike
Need help with what should be a fairly simple MEL script.
What i am trying to do
Create a script that can be called via command line (-preRender xxx.mel)
Script needs to define 9 regions of the frame and render
I know you can region render via command line using the "-reg xx xx xx xx" command, but this only renders one region per frame. I need 9 regions on the same frame.
So frame 1 has only 9 small regions of it rendered.
Any idea how to do this?
I have been looking and tryin to figure things out so far...
This is what i got
This will render a two regions in the GUI (by executing code from scriptEditor only)!
setAttr defaultRenderGlobals.left 300;
setAttr defaultRenderGlobals.rght 576;
setAttr defaultRenderGlobals.bot 75;
setAttr defaultRenderGlobals.top 530;
renderWindowRenderRegion renderView;
setAttr defaultRenderGlobals.left 754;
setAttr defaultRenderGlobals.rght 888;
setAttr defaultRenderGlobals.bot 212;
setAttr defaultRenderGlobals.top 662;
renderWindowRenderRegion renderView;
But now if i take that code and put it into a proc...
global proc renderA()
{
//Procedure...
}
Then add the "renderA;" into Maya's Pre Render, it causes Maya to crash. EVERYTIME.
What am i doing wrong/missing to get this to work sucessfully as a MEL script that can be run from command line?
Any help is appreciated.
Mike