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 $sp = pSphere1.translateZ; //controller | |
| pCylinder1.rotateY = -(9 * (frame*$sp)) ; // rotateObject | |
| pCylinder2.translateZ = 9 + (sin(((frame*$sp)*3.14/2)/10))*1.5; //translateObject |
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 createCircleInCenter() { | |
| string $sel[] = (`ls - sl`); | |
| int $num = size($sel); | |
| for ($i = 0 ; $i < $num ; $i++) { | |
| float $pos[] = (`xform -ws -q -sp $sel[$i]`); | |
| float $rotation[] = (`xform -ws -q -ro $sel[$i]`); | |
| string $controller[] = (`circle -c $pos[0] $pos[1] $pos[2] -nr 1 0 0 -r 0.8 -d 3 `); | |
| xform -cp $controller[0]; | |
| xform -ro $rotation[0] $rotation[1] $rotation[2] $controller[0]; | |
| parentConstraint $controller $sel[$i] ; |
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
| window | |
| -title "havm"; | |
| shelfTabLayout | |
| -image "smallTrash.png" | |
| -imageVisible true mainShelfTab; | |
| shelfLayout "havm"; | |
| setParent ..; | |
| showWindow; |
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
| timeToFrames(time - myLayer.startTime); | |
| or | |
| timeToFrames(time - myLayer.inPoint); |
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
| //Toggle Viewport X-Ray: | |
| $currentPanel = `getPanel -withFocus`; | |
| string $panelType = `getPanel -to $currentPanel`; | |
| if ($panelType == "modelPanel") | |
| { modelEditor -e -xray ( !`modelEditor -q -xray $currentPanel` ) $currentPanel; | |
| } |
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 | |
| def colorChange() : | |
| if cmds.getAttr('pSphere1.color')==0 : # attribut a Blue | |
| cmds.polyColorPerVertex(r=.159,g=.3811,b=.86,a=1,cdo=True) | |
| elif cmds.getAttr('pSphere1.color')==1 : # attribut a Red | |
| cmds.polyColorPerVertex(r=.86,g=.159,b=.3811,a=1,cdo=True) | |
| elif cmds.getAttr('pSphere1.color')==2 : # attribut a Green | |
| cmds.polyColorPerVertex(r=.3811,g=.86,b=.159,a=1,cdo=True) |
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
| #Following is the exercise, function provided: | |
| from functools import partial | |
| def func(u,v,w,x): | |
| return u + v + w + x | |
| #Enter your code here to create and print with your partial function | |
| dbl = partial(func, 4 , 4 , 4) | |
| print (dbl(4)) |
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
| proc updateUi() | |
| { | |
| string $sld[] = (`ls -sl`); | |
| print $sld[0]; | |
| textField -edit -tx $sld tfd ; | |
| } | |
| scriptJob -ct "SomethingSelected" "updateUi()"; |
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
| namespace -mv "insert_namespace_here" ":" -force; |