MEL Perfectly Orients 3-Joint Chain

Here’s a MEL script that can create a perfectly oriented 3-joint chain. The orient joint tool in Maya has some limitations and manually orienting with aimConstraints is ideal but time-consuming. Hope this script saves you some time (it saves me a lot of time). Cheers!

/*
-------------------------------
PERFECTLY ORIENTS 3-JOINT CHAIN
-------------------------------
  FUNCTION
    1. Creates perfectly oriented 3-joint chain
  PRE-REQUISITES
    1. Must be a parented 3-joint chain
  HOW TO USE
    1. Select top joint in 3-joint hierachy
    2. rf_3jntChain();
  RELEASE DATE / AUTHOR
    1. 22 JAN 2014 / RONALD FONG
*/
global proc rf_3jntChain(){
    // declare selection
        $head = `ls -sl`;
        $mid = `listRelatives -c $head`;
        $end = `listRelatives -c $mid`;
    // unparent
        parent -w $end;
        parent -w $mid;
    // orient using aim MID HEAD
        select -r $mid $head ;
        aimConstraint -offset 0 0 0 -weight 1 -aimVector 1 0 0 -upVector 0 1 0 -worldUpType "object" -worldUpObject $end;
    // orient using aim END MID
        select -r $end $mid ;
        aimConstraint -offset 0 0 0 -weight 1 -aimVector 1 0 0 -upVector 0 1 0 -worldUpType "object" -worldUpObject $head;
    // delete aim constraints
        delete ($mid[0] + "_aimConstraint1");
        delete ($head[0] + "_aimConstraint1");
    // freeze
        select -r $head $mid $end;
        FreezeTransformations;
    // parent
        parent $end $mid;
        parent $mid $head;
    // zeroEnd
        setAttr ($end[0] + ".jointOrient") 0 0 0;
    // prompt check
        print "Check Local Rotation Axes!";
}
rf_3jntChain();

Glitch

An experimental logo animation. It’s quite liberating to “break some rules” and animate to some dub step and introduce glitching. Hahaha! This was quite fun.

Masonry Logo Design

Masonry Logo Design (3)

Logo designs for Masonry Studios.Masonry Logo Design (2)

Masonry Logo Design (1)

JJ Lin Portrait Painting

Did a digital painting of JJ Lin! (again) Haha!
JJ Lin by Ronald Fong

Here’s the work in progress stills in GIF format :)
JJ Lin by Ronald Fong GIF

Jawn EP Launch Party

I was at Jawn’s (Jon Chan) EP Launch party just a few hours ago. Man, this guy’s music is amazing. His band was fanstastic too! It really was a great show but I was expecting more puns. Haha! Supported him by purchasing his EP in the form of an exquisite wooden USB stick. So awesome. Support local Singaporean musicians and creatives!Ronald Fong Jasmine Seo at Jawn Chan EP Launch

Photograph taken by Syazali! Thank you

And I cannot resist taking a couple of photos of his EP. It’s pretty.

Jawn Chan's EP (1)

Jawn Chan's EP (2)