-
- We should end the term with trying to apply some of what
we learned to modify, design and redesign useful MEL scripts.
So, I looked through some of the MEL scripts available on http://www.highend3d.com/maya.
-
- Let's look at the MEL command connectAttr. connectAttr
is useful to connect items in a dialog box with attributes in
a DG node. Let's bring our attention to a MEL script that uses
connectAttr in other ways: setCamera.mel
by TomHapp. This MEL script uses connectAttr to connect
attributes of a camera to those of other cameras. That allows
the first camera to mimic different cameras in different parts
of the timeline-- thus allowing us to switch to different cameras
for different parts of a scene. For an example of this, see CamTest1.mb. You have to source setCamera.mel to make it run.
-
- Playfully going with this idea, I thought I could hook up
other objects together besides cameras. So, in Mimic.mel
I modified Tom's code to hook up various primitives to each
other so they can dance together. See MimicTest2.mb
and MimicTest2-1.mb.
-
- Can we do this with rigged characters? On my website under
Maya Tutorials, I have some interesting MEL scripts by David
Gould. Take a look at scaleSkeleton.mel.
That gave me the idea of hooking skeletons up to each other.
Using ideas from scaleSkeleton.mel and from Mimic.mel, I wrote
MimicSkeleton.mel, which
animates identically rigged skeletons to work together. See MimicSkelTest.mb.
-
- Since MimicSkeleton.mel traces through the two trees literally
and hooks them up, what happens if I redesign the skeletons a
little, switching left and right sides of arms and legs. See
results in MimicSkelTest1-1.mb.