XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : allViewFit problem with command line

06-29-2012, 10: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?

06-30-2012, 07: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().

06-30-2012, 02: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.

06-30-2012, 06: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, 06: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.