Control color / alpha / depth via MEL

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  12 December 2003
Question Control color / alpha / depth via MEL

Hi there

A simple(?) question: I though I'd write some scripts to help me setup a few scene files for rendering - so I don't forget something in one file. Anyhow, materials are OK, lights, cameras, action.. ...but I would like as the last tweak to setup what channels to render: RGB / Alpha or DepthMap.

I can find all options of the render setup in the defaultRenderGlobals / Quality & resoution nodes BUT the flags I am looking for.

Any ideas?

/ Daniel
  12 December 2003

i think these are you looking for,

for the RGB channel:
setAttr "camera.image" 0;

where camera is the name of your renderable camera.

for Alpha channel:
setAttr "camera.mask" 0;

for Zdepth:
setAttr "camera.depth" 0;

i assume that you know that the value of 0 is off and the value of 1 is on.

just make a script that will trigger the value of these attributes. then in the render globals put the name of the script in the pre Render MEL options. so now before maya renders your scene it will execute first the script and then renders it.

i hope this is clear, if not just reply into it and we'll see what we can do.

  12 December 2003

I'll try it!

/ Daniel
  01 January 2006
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:00 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.