Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 17-05-2007 , 08:12 PM
sjtaylor84's Avatar
Subscriber
Join Date: Nov 2005
Location: England
Posts: 102

Need a simple utility to check aspect ratios

Hi there,

Not really sure where to post this so sorry if it's the wrong place! I'm always having to open up maya to use the render globals section just to use the resolution bit so I can check that the ratio of something i'm doing in another program is correct.

Is there a way of opening just render globals on it's own without having to wait for maya to load or is there a small simple (Mac) utility that will do the same? Quicktime doesn't appear to have the ability to maintain an aspect ratio while you type in other numbers.

Hope this makes sense!
Simon


www.simontayloranimation.com
# 2 19-05-2007 , 12:20 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
if you're saving out .ma rather than .mb you could simply parse the file and find it. Otherwise you could run maya in batch mode and query the render globals.


so do this:

create a script called getRenderResolution.mel and put it in the maya script path. The text below is the contents of the script.

global proc getRenderResolution()
{
int $width = `getAttr defaultResolution.width`;
int $height = `getAttr defaultResolution.height`;

print ("current render resolution is: " + $width + "x" + $height + "\n");
}

this simply prints out the resolution to a command prompt. Then on the command line when you want to query the render globals of a file:
/opt/aw//maya7.0.1/bin/maya -batch -command "getRenderResolution();" testScene.ma

that's what it was for me. If you're on windows i think you need to use mayabatch as the command to run but check the docs and you can find it all in there.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads