query current render layer in batch render process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Im trying to retrieve the current layer being rendered in a batch render process within an interactive maya session.
currently im trying to do it like this:
string $current_render_layer = `editRenderLayerGlobals -q -currentRenderLayer`;
And im setting this code as a mel script in the render options tab, as "pre" script for preRenderLayerMel.
When i launch the batch render im getting among other things the frame number being rendered but i keep getting
the same render layer name when rendering two different ones.
Im guessing this code is not actually querying the batch render process, but the Maya GUI tab.
So my question is: how can i retrieve the current render layer that is being rendered? Maybe there is another Maya API command that im not aware of, or maybe in the render options scripts there are already some global variables built in and the render layer would be one of those...
Thanks