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 mc | |
import maya.mel | |
def renameWindow(): | |
renameWin = "RenameRenderLayerWindow" | |
if maya.cmds.window(renameWin,ex=True): | |
maya.cmds.deleteUI(renameWin) | |
mc.window(renameWin, title = renameWin, widthHeight = (300,400)) | |
mc.columnLayout() |
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
//Render Targets | |
shadingNode -asRendering renderTarget -name BG_Target; | |
shadingNode -asRendering renderTarget -name FG_Target; | |
shadingNode -asRendering renderTarget -name BG_FG_Target; | |
shadingNode -asRendering renderTarget -name COMP_Target; | |
//Layered Textures | |
shadingNode -asTexture layeredTexture -name BG_FG_Texture; | |
shadingNode -asTexture layeredTexture -name COMP_Texture; |
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
$EmailFrom = “from@gmail.com” | |
$EmailTo = “to@gmail.com” | |
$Subject = “Your Render Is Ready!” | |
$Body = “Check the Image Folder because your Render is Done!” | |
$SMTPServer = “smtp.gmail.com” | |
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) | |
$SMTPClient.EnableSsl = $true | |
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“user”, “pass”); | |
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body) |
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
f = thisComp.layer("Depth Of Field").effect("Focal Point")("Slider") | |
z = transform.position[2] | |
m = thisComp.layer("Depth Of Field").effect("Lowest Z-depth")("Layer").transform.position[2] | |
r = (thisComp.layer("Depth Of Field").effect("Highest Z-depth")("Layer").transform.position[2]) - (thisComp.layer("Depth Of Field").effect("Lowest Z-depth")("Layer").transform.position[2]) | |
n = ((z - m)/r) | |
d = (f - n) | |
if (d < 0) d = (d *(-1)) | |
d * Math.pow(thisComp.layer("Depth Of Field").effect("Mutliplier")("Slider"),thisComp.layer("Depth Of Field").effect("Falloff")("Slider")) |
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
a = Math.round(thisComp.layer("DOF_Layer").effect("Chapter")("Slider").value) | |
b = Math.round(thisComp.layer("DOF_Layer").effect("Scene")("Slider").value) | |
c = comp("CH" + a + "_SC" + b); | |
c.layer(thisLayer.name).effect("Gaussian Blur")("Blurriness") |
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
$suffix="_MIA"; | |
$shaderName=`ls -sl`; | |
$newName=($shaderName[0] + $suffix); | |
$sgName=($shaderName[0] + "_SG"); | |
disconnectAttr ($shaderName[0] + ".outColor") ($sgName + ".surfaceShader"); | |
shadingNode -asShader -name "MIA_MAT_X" "mia_material_x"; | |
if (`connectionInfo -isDestination ($shaderName[0] + ".color")`) { |
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
//Create an Area Light | |
CreateAreaLight; | |
rename "testAreaLight"; | |
setAttr "testAreaLight.scaleZ" 10; | |
setAttr "testAreaLight.scaleX" 10; | |
setAttr "testAreaLight.scaleY" 10; | |
setAttr "testAreaLightShape.areaLight" 1; | |
setAttr "testAreaLightShape.decayRate" 1; | |
//create and connect a PhysLight Node |
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
//DepthShaderTool | |
//Move the nearPoint locator to the closest point in the renderable camera's field of view. | |
//Move the farPoint locator to the farthest point in the renderable camera's field of view. | |
//Assign the shader to all objects in the scene (optionally create a new render layer and shader override). | |
//Adjust the position of the near and farPoint to adjust the values of white and black in the render. | |
$cameras = `ls -sl`; | |
if ( size($cameras)==0 ) { | |
print "**Please select a camera**"; |
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
polyCube -w 10 -h 10 -d 10 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1 -n "ball"; | |
polySmooth -dv 2; | |
for( $i=0; $i<98; ++$i ) { | |
float $randRad = rand(1.0, 2.5); | |
vector $vertPos = `pointPosition ball.vtx[$i]` ; | |
float $vertX = $vertPos.x; | |
float $vertY = $vertPos.y; | |
float $vertZ = $vertPos.z; | |
float $randMV = rand(0.1, 0.5); |
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
//Tear off a selected camera and set all objects display to OFF except POLYGONS | |
//Select a Camera in the Outliner/Hypergraph | |
//Hover mouse over current view (eg., Persp) and tap CTRL/CMD | |
//Click button to run command | |
$camera = `ls -sl`; | |
$panel = `getPanel -wf`; | |
$activeCam = `modelPanel -q -cam $panel`; | |
$tearCam = $camera[0]; | |
OlderNewer