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 | |
selection = cmds.ls(sl=1) | |
for item in selection: | |
cmds.select(cl = True) | |
for face in [2,5,8,6,19,39,12,23]:#Aqui entre corchetes vas a poner las caras que quieres borrar. | |
cmds.select("%s.f[%s]"%(item, face), tgl = True) | |
cmds.delete() |
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
from PyQt4 import QtGui, QtCore, uic | |
import maya.cmds as cmds | |
import sip, os | |
uiFile = os.path.join(os.path.dirname(__file__), "designer_selectWindow_2.ui") | |
windowTitle = "Scene Manip" | |
windowObject = "pySceneManipWin" | |
def getMainWindow(): |
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
from PyQt4 import QtGui, QtCore #QtCore added | |
import maya.cmds as cmds #######Added | |
import sip | |
windowTitle = "Scene Manip"#######Added | |
windowObject = "pySceneManipWin"#######Added | |
def getMainWindow():#######Added | |
import maya.OpenMayaUI as mui#######Added | |
pointer = mui.MQtUtil.mainWindow()#######Added |
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
from PyQt4 import QtGui | |
class SceneManipWin(QtGui.QWidget): | |
def __init__(self): | |
super(SceneManipWin, self).__init__() | |
#Building a layout | |
self.gridLayout = QtGui.QGridLayout() | |
self.setLayout(self.gridLayout) |
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 socket, os | |
from org.gjt.sp.jedit import Macros | |
#Grabs the currently selected text or else grabs the document | |
curText = (textArea.getSelectedText()) | |
if not curText: | |
curText = (textArea.getText()) | |
#Only goes forward if there is some text to work with | |
if curText: |
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 | |
if not cmds.commandPort('localhost:6000', q=True): | |
cmds.commandPort(name='localhost:6000') |
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 socket | |
mayaSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
mayaSocket.connect(('localhost', 6000)) | |
mayaSocket.send("print what") | |
mayaSocket.close() |