Gary Nisbet

Visualise a Field [Maya]

Hey, So I wanted to visualise a field in maya, as I needed to know what it was looking like, and I found a pretty simple way to do it. Create a 3D fluid container: Dynamics > Fluid Effects > Create 3D Container Connect your field to the container: Window > Relationship Editors > Dynamic […]

Read More

Add notes to a node in maya with python

So sometimes you want to add some notes to your objects in maya, the quick python script below will add a string attribute to the node you input from maya import cmds def add_notes(node = None, default_text = "Input note here"): if not node: sel = if sel: node = sel[0] else: cmds.warning("Please select […]

Read More

Randomise Vertex Position – [Maya]

So I found a great little script here that will randomise the vertex positions in all the axis depending on how much you want it to, check it out below! $mySelection = `ls- sl`; $myVerts = `getVerts`; // this command grabs all the vertices of selected objects and put into a string array for ($vert […]

Read More

Find the colour at the closest point to a locator

So it’s a bit of an odd one, but I needed to be able to calculate the RGB value of the colour at certain points on the mesh, and at first this seemed a bit tricky, but using the cloestPointOnMesh node and the colorAtPoint command I was able to use a locator and easily connect […]

Read More

Draw a curve/line between two objects [Maya]

So I found this to be pretty useful, I used it to help visualise the direction of the wind I was pumping in to another variable, but it could be used for countless other things, just select the two objects you want to draw a curve between and run this MEL script. { string $sel[] […]

Read More

Maya Curves

Here is a little script I found from here, that allows you to query the amount of points (or cv’s) on a curve, where curveShape1 is the name of the curve you have created. string $curve = "curveShape1"; int $numSpans = `getAttr ( $curve + ".spans" )`; int $degree   = `getAttr ( $curve + ".degree" […]

Read More