회원 로그인
|
PyQt4를 이용한 위젯
http://tech-artists.org/forum/showthread.php?2845-PyQt-Widget-in-Maya-Mel-UI-problem
import sip from PyQt4 import QtGui, QtCore import maya.OpenMayaUI as omui import maya.cmds as m UI_WIN_NAME = 'WidgetInMayaUI_win' UI_WIN_TITLE = 'WidgetInMayaUI window' class WidgetInMayaUI(): def __init__(self) : self.ui_createUI() def ui_createUI(self): if m.window(UI_WIN_NAME, exists = True) : m.deleteUI(UI_WIN_NAME, window = True) self.window = m.window( UI_WIN_NAME, title = UI_WIN_TITLE, maximizeButton = False,) self.ui_LAY_mainForm = m.formLayout() self.attachLayout = m.frameLayout(labelVisible = False) m.setParent(self.ui_LAY_mainForm) self.ui_LAY_toolbar = m.columnLayout() m.symbolCheckBox(image = 'sortName', height = 35, width = 35) m.symbolCheckBox(image = 'sortName', height = 35, width = 35) m.symbolCheckBox(image = 'sortName', height = 35, width = 35) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'top', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachControl = (self.attachLayout, 'right', 2, self.ui_LAY_toolbar)) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'bottom', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'left', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'top', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'bottom', 2)) m.formLayout(self.ui_LAY_mainForm, e = True, attachNone = (self.ui_LAY_toolbar, 'left')) self.attachLayoutQ = sip.wrapinstance(long(omui.MQtUtil.findLayout(self.attachLayout)), QtCore.QObject) self.QtLayout = QtGui.QHBoxLayout() self.attachLayoutQ.setLayout(self.QtLayout) self.list = QtGui.QListWidget() self.list.addItem('aaa'); self.list.addItem('bbb'); self.list.addItem('ccc') self.QtLayout.addWidget(self.list) self.list.setParent(self.attachLayoutQ) m.showWindow(self.window) def run(): WidgetInMayaUI()
댓글 0개
| 엮인글 0개
466개(16/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 42941 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 64233 | 2014.01.08 17:59 | |
164 | [참고] fish 리깅 (마야) | artsone | 4073 | 2007.06.19 09:54 |
163 | [참고] Horse 리깅 (마야) | artsone | 4062 | 2007.06.19 09:52 |
162 | [참고] dog 리깅 (마야) | artsone | 3950 | 2007.06.19 09:50 |
161 | [참고] Shark 리깅 (마야) | artsone | 3818 | 2007.04.02 20:11 |
160 | [참고] ollie v1.5 (마야) | artsone | 4047 | 2007.01.19 17:56 |
159 | [Plugin] Advanced Skeleton v1.85 Evaluation | artsone | 2494 | 2006.12.10 02:11 |
158 | [참고] LowMan v1.2 (마야) | artsone | 3394 | 2006.11.22 18:32 |
157 | [Base] 저장 시 에러 | 푸딩뱃살 | 4646 | 2013.03.13 13:03 |
156 | [Animation] 파도 리깅 참고 동영상 | 푸딩뱃살 | 3477 | 2013.03.13 13:00 |
155 | [Script] vectorRenderGlobals 노드 | 푸딩뱃살 | 4339 | 2013.03.13 12:59 |
154 | [Modeling] 모델링 버텍스 체크 팁 | 푸딩뱃살 | 3984 | 2013.03.12 18:16 |
153 | [Script] skinPercent() | artsOne | 3459 | 2012.08.29 10:33 |
>> | [Script] PyQt4를 이용한 위젯 | artsOne | 3355 | 2012.08.28 15:44 |
151 | [Script] Error: File contains unknown nodes or data | artsOne | 3697 | 2012.08.28 15:36 |
150 | [Base] Maya 다운로드 | artsOne | 4629 | 2011.07.04 20:50 |
149 | [Rigging] Maya 2011 새로운 기능 - Skinning Method (skin 꼬임 현상 해결) | artsOne | 5022 | 2010.08.25 21:06 |
148 | [Base] Maya 2011 스타일 바꾸기 | artsOne | 4151 | 2010.06.08 01:21 |
147 | [Base] 단축키 옮기기 | artsOne | 3721 | 2010.05.04 10:35 |
146 |
[Rigging] |
artsOne | 2349 | 2010.03.31 14:15 |
145 | [Rigging] joint 위치에 따른 skin 모양 | artsOne | 3104 | 2010.03.31 12:32 |