PDA

View Full Version : allViewFit problem with command line


cgbeige
06-29-2012, 11:42 PM
I made a simple script to render a hardware preview of a file for selected Maya files but it sometimes renders something that's useless since the camera isn't fitting everything. The problem is that -preRender "allViewFit(1);" doesn't work from the command line. Is there a trick to getting that to work?

zoharl
06-30-2012, 08:20 AM
Could you please elaborate.

If I needed to implement that, then I would have ran a python script inside maya. In the script I would iterate the file scenes, open them one by one, run allViewFit, and render.

If by command line, you meant the os command line, and it's crucial to run it from outside, then I would have used commandPort().

cgbeige
06-30-2012, 03:19 PM
sorry - I should have been more specific. I'm doing a hardware render preview of documents with a batch render script. The individual command is like this:

Render -r hw2 -preRender "allViewFit(1);" -of jpg -x 640 -y 480 -rd "${docDir}" "${f}"

I'm guessing that because Maya isn't actually creating a view, it has to be initialized somehow.

zoharl
06-30-2012, 07:06 PM
I understand, but I just think that if this approach doesn't fit your needs, you should simply tailor a new script to do that and more (in python for example).

CGTalk Moderation
06-30-2012, 07:06 PM
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.