Skip to content

Commit

Permalink
Add meshDisplay commands
Browse files Browse the repository at this point in the history
  • Loading branch information
minoue committed Oct 12, 2016
1 parent 39477ed commit 6693c02
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions app/module/polygon/meshDisplay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import maya.cmds as cmds
import maya.mel as mel


# class name must be 'Commands'
class Commands(object):

commandDict = {}

def _applyColor(self):
mel.eval("polyColorPerVertex -r 0.5 -g 0.5 -b 0.5 -a 1 -cdo;")
commandDict['applyColor'] = "polyApplyColor.png"

def _paintVertexColorTool(self):
cmds.PaintVertexColorTool()
commandDict['paintVertexColorTool'] = "paintVertexColour.png"

def _createEmptyColorSet(self):
mel.eval("colorSetEditCmdNew new none 1 RGB 0")
commandDict['createEmptyColorSet'] = "polyColorSetCreateEmpty.png"

def _deleteCurrentColorSet(self):
mel.eval("colorSetEditCmd delete none")
commandDict['deleteCurrentColorSet'] = "polyColorSetDelete.png"

def _renameCurrentColorSet(self):
mel.eval("colorSetEditCmd rename none")
commandDict['renameCurrentColorSet'] = "polyColorSetRename.png"

def _modifyCurrentColorSet(self):
mel.eval("colorSetEditCmd modify none")
commandDict['modifyCurrentColorSet'] = "polyColorSetModify.png"

def _colorSetEditor(self):
mel.eval("colorSetEditor")
commandDict['colorSetEditor'] = "polyColorSetEditor.png"

0 comments on commit 6693c02

Please sign in to comment.