Created
December 9, 2017 15:01
-
-
Save manhha00/a8367bbbb958e8a812f5f4ecbd866b54 to your computer and use it in GitHub Desktop.
maya - mel - listConnections nodeType by RobTheBloke
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function takes the name of a node and prints | |
// the names of all animated attributes | |
proc listAttachedAnimCurves(string $node) { | |
// get the connections and connected nodes | |
$src_a = `listConnections -s true -d false -c true $node`; | |
$src_n = `listConnections -s true -d false $node`; | |
print($node+"\n"); | |
for($i=0;$i<size($src_n);$i++) { | |
$j = $i*2; | |
// query the node type of the connected node | |
$type = `nodeType $src_n[$i]`; | |
// see if it's a | |
// time to angular curve | |
// time to length curve or a | |
// time to unitless curve | |
if($type=="animCurveTA" || | |
$type=="animCurveTL" || | |
$type=="animCurveTU") { | |
print("\t"+$src_a[$j+1]+"\n"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment