회원 로그인
|
Shapes Color Changer
Shapes Color Changer
# coding: euc-kr # Shapes Color Changer v0.1 # artsone@dvframes.com # release v0.1 : 2009.04.09 # v0.2 : 2009.04.22 # # 실행 : shapesColor_tool = shapesColorUI() # 함수로 실행시 # 사용법 : shapesColor(사용여부, 컬러번호) # 사용여부 0, 1 # 컬러번호 0~31 import maya.cmds as cmds import maya.mel as mel class shapesColorUI(): def __init__(self): if (cmds.window('shapesColorWin', ex=1)): cmds.deleteUI('shapesColorWin', wnd=1) self.shapescolorwin = cmds.window('shapesColorWin', t=u'Shapes Color Changer v0.1', iconName='ShColorCh', mxb=0) cmds.frameLayout(lv=0, bs="etchedOut") cmds.columnLayout(adj=1) cmds.rowColumnLayout(nc=4, cw=[(1, 30), (2, 30), (3, 30), (4, 30)]) cmds.button(l='X', c='shapesColor(0,0)') #none cmds.button(bgc=[1, 0, 0], l=' ', c='shapesColor(1, 13)') #red cmds.button(bgc=[0.4, 0, 0], l=' ', c='shapesColor(1, 4)') #dark red cmds.button(bgc=[0, 1, 0], l=' ', c='shapesColor(1, 14)') #green cmds.button(bgc=[0, 0.4, 0], l=' ', c='shapesColor(1, 23)') #dark green cmds.button(bgc=[0, 0, 1], l=' ', c='shapesColor(1, 6)') #blue cmds.button(bgc=[0, 0, 0.4], l=' ', c='shapesColor(1, 15)') #dark blue cmds.button(bgc=[1, 1, 0], l=' ', c='shapesColor(1, 17)') #yellow cmds.window('shapesColorWin', e=1, wh=(132, 70)) cmds.showWindow(self.shapescolorwin) mel.eval('print("[Shapes Color Changer] OK!!n")') def shapesColor(enable, colorNo): selObj_ = [] selObj_ = cmds.ls(sl=1) if len(selObj_) >= 1: for sel_ in selObj_: if cmds.objectType(sel_) == 'transform': selShape_ = cmds.listRelatives(sel_, s=1) cmds.setAttr('%s.overrideEnabled' % selShape_, enable) cmds.setAttr('%s.overrideColor' % selShape_, colorNo) if cmds.objectType(sel_) == 'joint': cmds.setAttr('%s.overrideEnabled' % sel_, enable) cmds.setAttr('%s.overrideColor' % sel_, colorNo) else: mel.eval('warning("[SCC] Must select Objejct.n")') shapesColorChanger_tool = shapesColorUI()
댓글 0개
| 엮인글 0개
466개(13/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 43899 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 65075 | 2014.01.08 17:59 | |
224 | [참고] HSUAN WEI LIANG Character TD / Rigger Reel | 푸딩뱃살 | 3478 | 2013.04.14 03:12 |
223 | [참고] 드래곤볼 셀 모델링 | 푸딩뱃살 | 5 | 2013.04.14 03:06 |
222 | [참고] 말 모델링 (마야) | 푸딩뱃살 | 5760 | 2013.04.14 02:58 |
221 | [참고] Advance Hyper Skinning System (Art & Technic) -By Subbu | 푸딩뱃살 | 3759 | 2013.04.10 02:36 |
220 | [참고] Martin Orlowski : Character tools reel | 푸딩뱃살 | 3266 | 2013.04.10 02:33 |
219 | [Plugin] Studio Library for Maya | 푸딩뱃살 | 6544 | 2013.04.10 02:31 |
218 | [Dev] Visual Studio 2012 Express에서 Maya Plugin 개발 | artsOne | 6771 | 2013.01.08 13:38 |
217 | [Plugin] Mel Studio Pro v1.1.0 for Maya 6.5, 7 | artsOne | 4413 | 2008.03.10 18:35 |
216 | [Script] Expression을 이용한 Follow Through | artsOne | 3543 | 2008.07.08 18:44 |
>> | [Script] Shapes Color Changer | artsOne | 2799 | 2009.04.30 10:57 |
214 | [Rigging] IK Handle - IK Solver | artsOne | 2897 | 2009.04.27 23:27 |
213 | [Script] shelfButton 예제 | artsOne | 2620 | 2009.04.09 16:05 |
212 | [Script] shape color 바꾸기 | artsOne | 2719 | 2009.03.22 02:55 |
211 | [Script] [펌] 조인트 미러 사용 후 리네임 | artsOne | 2812 | 2008.08.04 18:04 |
210 | [Script] [펌] Scondery MEL analysis | artsone | 2593 | 2008.06.09 17:34 |
209 | [Script] Python for Maya - 15. 자동 polygon 생성 애니 만들기 | artsOne | 2105 | 2008.04.14 18:25 |
208 | [Script] [펌] 커브 다 선택하기 | artsOne | 2600 | 2008.02.03 04:13 |
207 | [Script] [펌] 카메라 레졸루션 영역 온/오프 토글 | artsOne | 2235 | 2008.02.03 04:12 |
206 | [Rigging] [펌] 스크닝, 얼굴, 최종 | artsOne | 2606 | 2008.02.03 03:03 |
205 | [Rigging] [펌] max influences | artsOne | 2747 | 2008.02.03 04:09 |