Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 13-07-2004, 07:32 PM   #1
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default query render globals?

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

Thanks.
Dann is offline   Reply With Quote
Old 13-07-2004, 08:34 PM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 14-07-2004, 02:14 AM   #3
dannyngan
Registered User
 
dannyngan's Avatar
 
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Thanks: 0
Thanked 1 Time in 1 Post
Default

(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
dannyngan is offline   Reply With Quote
Old 14-07-2004, 03:14 AM   #4
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

That looks like it's just what I'm looking for. Thanks Danny.
Dann is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Rending Render Layers Ozgalis Lighting & Rendering 7 07-01-2011 07:04 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.