Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 13-07-2004 , 06:32 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

query render globals?

How can I query the render globals? I need to access the resolution and aspect ration.

Thanks.

# 2 13-07-2004 , 07:34 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
That's a bit tricky one. First you need to find out what renderer is set to be used and then you need to find out from where those settings are coming. They've really mixed this up when they introduced the new render global system with the common and renderer specific settings... So honestly I don't know user added image


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 3 14-07-2004 , 01:14 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
(NOTE: I'm going to type out all the commands for the sake of anyone relatively new to MEL.)

You'll want to look at the scene node called "defaultResolution". You can verify its existence with this command:

Code:
ls -renderResolutions;
You can get a list of all attributes connected to that node via the "listAttr" command:

Code:
listAttr defaultResolution;
The list of attributes for defaultResolution includes entries for width, height, and deviceAspectRatio. To query those attributes:

Code:
getAttr defaultResolution.width;
getAttr defaultResolution.height;
getAttr defaultResolution.deviceAspectRatio;
Of course you can assign those values to variables as needed:

Code:
$width = `getAttr defaultResolution.width`;
$height = `getAttr defaultResolution.height`;
You may also want to check into the default nodes called "defaultRenderGlobals" and "defaultRenderQuality". They may contain additional rendering information that you may need.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 4 14-07-2004 , 02:14 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
That looks like it's just what I'm looking for. Thanks Danny.

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