Skip to content

Maya Quicktips

spherical or radial uv map

Download file: radial_uv.ma

2 ramps, one red and circular, other green and radial, add them together into a layered texture, feed red to the u of a texture, green to v of a texture. Can then play with the ramp parameters to adjust placement.

Expression to drive a string attribute

Eg an image sequence loop of 8 frames feeding a texture or a light.

vex
$frm = `currentTime -q`;
$numframes = 8;
$frm = ($frm % $numframes)+1;
setAttr -type "string" file1.filepath ("/path/to/texture_v0" + $frm + ".exr");
$frm = `currentTime -q`;
$numframes = 8;
$frm = ($frm % $numframes)+1;
setAttr -type "string" file1.filepath ("/path/to/texture_v0" + $frm + ".exr");

Display persistent camera frustum

This is now an option in maya 2015 (finally!), but what if you're on an earlier version?

The standard answer is to select the camera and go 'display -> rendering -> camera light manipulator -> clipping planes', but annoyingly they disappear during playback or when the timeline is scrubbed.

A workaround is to create a stereo camera, parent it beneath your shot shot camera, and use one of its view frustum options. Just remember to delete it when you're done.

Add object to existing deformer

With pymel:

python
deformer('hotOceanDeformer1', e=True, g='theNewShape')
deformer('hotOceanDeformer1', e=True, g='theNewShape')

Implicit underscores when renaming

When renaming things in from the outliner, or channel box, or attribute editor, just type things with spaces, maya will convert them to underscores for you.

Eg, type

buildings grp

and maya will name it

buildings_grp

Very handy when you name something like

master_curve_timeoffset_predynamics_post_rebuild

or similar.

=== Quick expressions from the attribute editor with = === If you need to drive something with time, open the attribute editor and for that value type in

=time

And an expression will be automatically created. Similarly for

=frame

or

=locator1.translateX

manipulate the graph editor with expressions

At the top of the graph editor are 2 numerical values, select a key, those readouts tell you the time and value for that key. You can use expressions here to offset or scale time and value.

Eg, if you want to move a few keys 10 frames later, select them, and in the time value type

+=10

Or to scale the values by half (using 0 as the pivot), type into the value box

*=0.5