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 os | |
import maya.cmds as cmds | |
import glob | |
def matCapShader(): | |
mainShader=cmds.shadingNode("surfaceShader",n="matCapShader",asShader=True) | |
envBall=cmds.shadingNode("envBall",n="matCapBall",asTexture=True) | |
placeTextureNode3D=cmds.shadingNode("place3dTexture",n="matCapTexturePlacer3d",asUtility=True) | |
fileNode=cmds.shadingNode("file",n="matCapFile",asTexture=True) | |
placeTextureNode2D=cmds.shadingNode("place2dTexture",n="matCapTexturePlacer2d",asUtility=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
import maya.cmds as cmds | |
#Thickness of the pipe | |
circleRadius=5 | |
#Length Spans | |
lengthSpans=10 | |
#Radial Spans of the Pipe | |
radialSpans=6 |
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 | |
import maya.mel as mel | |
def cadCleanUp(): | |
mrgVrtx=cmds.checkBox(mrgVtxChkBox,v=True,q=True) | |
mrgThreshold=0.001 | |
laminaFaces=cmds.checkBox(lamFacChkBox,v=True,q=True) | |
nonManifoldGeo=cmds.checkBox(nmfGeoChkBox,v=True,q=True) | |
maintainNormals=cmds.checkBox(mainNorChkBox,v=True,q=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
def togglePolyDisplay(): | |
x=cmds.modelEditor("modelPanel4", q=True, polymeshes=True) | |
if x == 0: | |
cmds.modelEditor("modelPanel4", e=True, polymeshes=True) | |
else: | |
cmds.modelEditor("modelPanel4", e=True, polymeshes=False) |
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
//Switch Perspective Cameras | |
$currentCamera = `lookThru -q`; | |
string $allCameras[]; | |
$allCameras = `listCameras -p`;// This will select perspective cameras only | |
int $nextCamera; | |
for($pos=0;$pos<size($allCameras);$pos++) | |
{ | |
if($currentCamera == $allCameras[$pos]) $nextCamera = $pos+1; | |
} | |
if($nextCamera>=size($allCameras)) $nextCamera = 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
#Set OpenGL lights to Maya like viewport | |
import bpy | |
l0 = bpy.context.user_preferences.system.solid_lights[0] | |
l1 = bpy.context.user_preferences.system.solid_lights[1] | |
l2 = bpy.context.user_preferences.system.solid_lights[2] | |
l0.use = True | |
l0.diffuse_color = (0.384, 0.384, 0.384) | |
l0.specular_color = (0.2333, 0.2333, 0.2333) | |
l0.direction = (-0.028169013559818268, 0.563380241394043, 0.8257173895835876) |
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
#---------Reconstruct Subdiv Script for Maya---------- | |
#Script by - Kanishk Chouhan | |
#Email - [email protected] | |
#Blog - www.pixel-architect.blogspot.com | |
#Description - | |
#This script allows u to reverse the result of smooth operation in maya after deleting the history | |
#It also preserves the original UV of the mesh | |
#Select the mesh u want to unsmooth and execute the script | |
#Script might take some time to execute depending on the polycount... |