mentalrayGlobals.preRenderMel

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  02 February 2004
mentalrayGlobals.preRenderMel

Hi,

Does anyone knows how to set an outputpath for mentalray?

This script is maybe missing something:
setAttr mentalrayGlobals.outputPath -type "string" "Y:/house/line_test/INTRO/RIGHT";


Thanx a lot.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
  02 February 2004
Shouldn't it be this? Not positive though as I'm not a MEL master by any means.

"Y:\\house\\line_test\\INTRO\\RIGHT";

Emmortal
 
  02 February 2004
Thanx Emmortal,

But it doesn't work either.
In fact I'm wondering if the prerenderMel has any effect. Even a stupid print "text" doesn't work.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
  02 February 2004
Thanx Emmortal,

But it doesn't work either.
In fact I'm wondering if the prerenderMel has any effect. Even a stupid print "text" doesn't work.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
  02 February 2004
I will assume you are attempting command line renders.

To render frames 1 to 25 to d:\myImages you need to create a mel script called mrStart.mel (but the name isnt important).

global proc mrStart()
{
setAttr "mentalrayGlobals.startFrame" 1;
setAttr "mentalrayGlobals.endFrame" 25;
setAttr mentalrayGlobals.outputPath -type "string" d:/myImages;
mrBatchRender_v5;
}

Then launch the render from the commandline using...

mayabatch -file sceneFile -proj projectPath -command mrStart

(obviously substituting sceneFile and projectPath with your name and path)

You can override many of the other render globals in the same way, but there are some quirky things. For example the output folder specified above will be ignored unless you also edit mrBatchRender_v5.mel and change the line

string $imageDir = miSetImageDir();

to

string $imageDir = "";



(mrBatchRender_v5.mel is part of the maya installation, provided as a way of launching a commandline mentalray for maya render)

If you get this far, then its not much extra to use some scripting to generate the mrStart.mel automatically. I have it set up so that I just type "mr sceneName 1 25" at the command prompt and the output folder gets created and the render invoked. I can pass on the details if you are interested.
 
  02 February 2004
Thumbs down

Yes!
Cool! For the first time maya reads the mel, with this lines.
global proc mrStart()
{
setAttr "mentalrayGlobals.startFrame" 1;
setAttr "mentalrayGlobals.endFrame" 5;
setAttr mentalrayGlobals.outputPath -type "string" "Y:/house/line_test/INTRO/RIGHT";
mrBatchRender_v5;
}


But
rendered pictures allways come to my proj/mentalRay/images/
__________________
.::We only have 2 limits:
+ time
+ imagination
::.

Last edited by rollmops : 02 February 2004 at 02:47 PM.
 
  02 February 2004
You are almost there.
You need to track down and edit mrBatchRender_v5.mel
(usually in C:\Program Files\AliasWavefront\Maya5.0\scripts\others)

and change the line

string $imageDir = miSetImageDir();

to

string $imageDir = "";


(This `miSetImageDir()` resets your mentalrayGlobals.outputPath back to what ever was set in your project file paths - which is not what we want here).
 
  02 February 2004
Just do:
workspace -rt images $rd;

Where $rd is the render directory. It has worked for me in all instances, though perhaps it is not bulletproof.

- Matthew Durante
 
  02 February 2004
I think that "workspace -rt images $rd;" only works for batch renders launched from within maya interactive. I cant get it to work as part of a start-up script for a command-line render.
 
  02 February 2004
No, it works from outside of maya. Check out:
http://www.cgtalk.com/showthread.php?s=&threadid=94005

I've been using variants of this for awhile without problems, though honestly not lately. The version I use is plugged into a network rendering system but it's nearly the same code.

- Matthew Durante
 
  01 January 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:21 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.