Running a pre-render python script without using MEL?

Running a pre-render python script without using MEL?

Anonymous
Not applicable
1,620 Views
0 Replies
Message 1 of 1

Running a pre-render python script without using MEL?

Anonymous
Not applicable

Hi,

 

Is there any way you can run a pre-render python script without using MEL?

 

Right now I'm doing this:

render.exe -r vray -s 1 -e 1 -preRender vrayPreRender c:/path/to/scenefile.ma

 

This invokes the script vrayPreRender.mel. Inside this vrayPreRender.mel script, I've put the following:

global proc vrayPreRender()
{
python("import sys\nsys.path.append(\"c:/path/to/script\")\nimport vrayPreRender\nvrayPreRender");
}

 

...which executes the vrayPreRender.py script. However, I'd like to not use the MEL script that I just use to import and execute the python script. Is this possible to do directly from the render command?

 

Regards,

Fredrik

0 Likes
1,621 Views
0 Replies
Replies (0)