Last active
December 13, 2018 07:14
-
-
Save AndresMWeber/2863a8a7f5ca377712d1bda52f8ef4d2 to your computer and use it in GitHub Desktop.
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 sys | |
from PySide2.QtWidgets import * | |
import maya.standalone as ms | |
import maya.cmds as mc | |
class Window(QWidget): | |
def __init__(self): | |
super(Window, self).__init__() | |
self.setupUI() | |
self.show() | |
def setupUI(self): | |
self.layout = QHBoxLayout() | |
self.setLayout(self.layout) | |
self.button = QPushButton("List Scene") | |
self.button_create = QPushButton("Create Node") | |
self.layout.addWidget(self.button) | |
self.layout.addWidget(self.button_create) | |
self.button.clicked.connect(self.list_scene) | |
self.button_create.clicked.connect(self.create_node) | |
def list_scene(self): | |
print mc.ls(type='transform') | |
def create_node(self): | |
print mc.group(em=True) | |
if __name__ == '__main__': | |
app = QApplication(sys.argv) | |
ms.initialize() | |
win = Window() | |
app.exec_() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment