This file contains hidden or 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
| import maya.cmds as cmds | |
| sel = cmds.ls(sl = True) | |
| jnts = cmds.skinCluster(sel, inf = True, q = True) | |
| cmds.select(jnts) |
This file contains hidden or 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
| string $currentTool = `currentCtx`; | |
| setToolTo moveSuperContext; | |
| vector $pos = `manipMoveContext -q -p Move`; | |
| string $loc[] = `spaceLocator -n "average#"`; | |
| move -ws -a ($pos.x) ($pos.y) ($pos.z) $loc; | |
| setToolTo $currentTool; |
This file contains hidden or 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
| import maya.cmds as cmds | |
| pos = cmds.xform('chest_JNT_JNT', q=1 , ws =1 , t=1) | |
| print pos | |
| cmds.xform('chest2', ws =1, t =pos) | |
| cmds.move( pos[0] , pos[1] , pos[2] , 'chest2', rpr=1) | |
| rot = cmds.xform('chest_JNT_JNT', q=1 , ws =1 , ro=1) | |
| cmds.xform('chest2', ws=1, ro= (rot[0] , rot[1] , rot[2])) | |
| cmds.rotate(0, -180, 0 ,'chest2', os = 1, r=1 ) |
This file contains hidden or 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
| string $sel[] = `ls -sl`; | |
| string $attrList[]; | |
| for ($current in $sel) | |
| { | |
| $attrList = `listAttr -k $current`; | |
| for ($attr in $attrList) | |
| { | |
| int $keyCount = `keyframe -at $attr-query -kc $current`; | |
| if ($keyCount > 0) | |
| setKeyframe -at $attr $current; |
This file contains hidden or 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
| import maya.cmds as cmds | |
| sel = cmds.ls(sl = True) | |
| jnts = cmds.skinCluster(sel, inf = True, q = True) | |
| cmds.select(jnts) |
This file contains hidden or 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
| $sel = `ls -sl`; | |
| select -clear; | |
| SelectToggleMode; | |
| for ( $s in $sel ) { | |
| string $buff[]; | |
| tokenize $s "." $buff; | |
| if ( size ( $buff ) == 2 ) | |
| select -r $buff[0]; | |
| } |
This file contains hidden or 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
| string $stringB = "Maya"; | |
| window; | |
| columnLayout; | |
| button -l "test" -command ("Test(\"string \",\""+$stringB+"\")") - w 150; | |
| showWindow; | |
| global proc Test(string $stringTestA, string $stringTestB) | |
| { | |
| print ($stringTestA + $stringTestB); | |
| } |
This file contains hidden or 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"); |
This file contains hidden or 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
| global proc havm_moveZero() { | |
| string $sel[]= (`ls -sl`); | |
| //print ($sel[1] + "\n"); | |
| string $veSel[] = (`polyListComponentConversion -fe -tv $sel`); | |
| string $vertex[] = (`filterExpand -ex 1 -sm 31 ($veSel) `); | |
| int $n = size($vertex); | |
| print $n; | |
| print "\n"; |
This file contains hidden or 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
| float $o[]= (`pointPosition -w polySurface70.vtx[120]`); | |
| vector $O= << $o[0] , $o[1] , $o[2] >>; // start | |
| float $u[]= (`pointPosition -w polySurface70.vtx[122]`); | |
| vector $U= << $u[0] , $u[1] , $u[2] >>; // end0 | |
| $U = $U - $O; | |
| float $v[]= (`pointPosition -w locator1`); | |
| vector $V= << $v[0] , $v[1] , $v[2] >>; // end1 | |
| $V = $V - $O; |
NewerOlder