append existing lens shader

david | dj mod,mel script,mentalray,rendering | Wednesday, October 24th, 2007

Here's another modification to a maya 2008 mel script that enables you to easily hook up more than one lens shader to the camera.

For example, if you have set up the standard Physical Sun and Sky environment then you will already have a lens shader in place (mia_exposure_simple or mia_photographic perhaps). Now if you also want mia_lens_bokeh to do some depth of field then you will need to use the secondary lens shader list where you can "Create" a new lens shader.

But what if you want to use an existing lens shader rather than creating a new one?

This modification allows you to do just that.

For example you may wish to connect the mia_physicalsky node as a lens shader to take advantage of the "visibility distance" parameter. In this case you would definately want to use the existing mia_physicalsky.

The modified file is AEconnectionTableTemplate.mel and you should place it in your local scripts folder and restart maya. (Never put customized mel scripts into the maya installation folders). Now if you look at the camera's attribute editor you will see this

cameraShapeAE.jpg

You must first select a lens shader, then shift-select the cameraShape node, open the attribute editor and click "Append" to make the connection.

Download here

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck