def gameOpt(): # dialogue box softenEdgeDialogue = cmds.confirmDialog(t='Soften Edges', b=['Yes', 'No'], defaultButton='Yes', cancelButton='No', dismissString='No') # this softens the mesh's edges, should the user click 'Yes' if softenEdgeDialogue == 'Yes': for i in objs: cmds.select(i) cmds.polySoftEdge(a=180) # this runs optimization commands for game engine for i in objs: cmds.select(i) cmds.snapMode(gr=True) cmds.move(rpr=True) cmds.snapMode(gr=False) cmds.makeIdentity(apply=True, t=1, r=1, s=1, n=0, pn=1) cmds.DeleteHistory() # deselect cmds.select(clear=True)
def c(self): if Cache.currentContext == 'myMove': cmds.snapMode(curve=True) else: if self.getSelection() == 'None': self.primitiveMenu() elif len(self.getSelection()) == 2: if self.getType(0)[0] == 'camera': self.constrainToParent('bake') else: self.constrainToParent('noBake', 'Maintain') else: print 'this is where we can place the convert or create tools'
def c (self): if Cache.currentContext == 'myMove': cmds.snapMode( curve = True ) else: if self.getSelection() == 'None': self.primitiveMenu() elif len(self.getSelection()) == 2: if self.getType(0)[0] == 'camera': self.constrainToParent('bake') else: self.constrainToParent('noBake', 'Maintain') else: print 'this is where we can place the convert or create tools'
def TanLock(arg=None): """ //Lock tangents string $panType = `getPanel -withFocus`; { if ($panType == "graphEditor1") { undoInfo -stateWithoutFlush off; keyTangent -weightLock off; undoInfo -stateWithoutFlush on; } else dR_DoCmd("pointSnapPress"); } //Unlock tangents string $panType = `getPanel -withFocus`; { if ($panType == "graphEditor1") { undoInfo -stateWithoutFlush off; keyTangent -weightLock on; undoInfo -stateWithoutFlush on; } else dR_DoCmd("pointSnapRelease"); } """ panType = cmds.getPanel(wf=True) if arg == "Press": if panType == "graphEditor1": cmds.undoInfo(swf=False) mel.eval('MoveTool;') cmds.keyTangent(e=True, wl=False) cmds.undoInfo(swf=True) else: cmds.snapMode(point=True) elif arg == "Release": if panType == "graphEditor1": cmds.undoInfo(swf=False) mel.eval('global string $gSelect; setToolTo $gSelect') cmds.keyTangent(e=True, wl=True) cmds.undoInfo(swf=True) else: cmds.snapMode(point=False)
def c_release(self): cmds.snapMode(curve=False)
def C_release (self): cmds.snapMode( curve = False ) # it gets stuck for some reason and must be turned off
def x_release(self): cmds.snapMode(grid=False)
def v_release(self): cmds.snapMode(point=False)
def x(self): cmds.snapMode(grid=True)
def C_release(self): cmds.snapMode(curve=False ) # it gets stuck for some reason and must be turned off
def v(self): cmds.snapMode(point=True)
def c_release (self): cmds.snapMode( curve = False )
def v (self): cmds.snapMode( point = True )
def x_release (self): cmds.snapMode( grid = False )
def x (self): cmds.snapMode( grid = True )
def v_release (self): cmds.snapMode( point = False )