회원 로그인
|
폴리곤 체크 스크립트
폴리곤 체크 스크립트 (엣지의 갯수가 5개 이상 폴리곤 체크 for 얼렘빅)
언리얼4의 얼렘빅을 사용하기 위해서 폴리곤의 엣지의 갯수가 5개 이상 넘어갈 수 없으므로 이를 체크하기 위한 급! 작성한 스크립트
작동 원리
정해진 오브젝트의 총 폴리곤(페이스) 수를 구하고,
총 폴리곤을 반복적으로 하나씩 폴리곤 정보를 추출하여 버텍스 넘버의 갯수로 추려(선택)낸다.
polyName_에 원하는 오브젝트명을 적어준다.
언리얼4의 얼렘빅을 사용하기 위해서 폴리곤의 엣지의 갯수가 5개 이상 넘어갈 수 없으므로 이를 체크하기 위한 급! 작성한 스크립트
작동 원리
정해진 오브젝트의 총 폴리곤(페이스) 수를 구하고,
총 폴리곤을 반복적으로 하나씩 폴리곤 정보를 추출하여 버텍스 넘버의 갯수로 추려(선택)낸다.
사용법
쉐입 하나 선택 후 checkPoly() 실행!
# -*- coding: utf-8 -*- #v0.3 (20170707) from maya import cmds,mel #import sys,re,os def checkPoly(): #폴리 정보 polyName_ = cmds.ls(sl=1)[0] selectPolyCount_ = cmds.polyEvaluate(polyName_,f=1) #progressBar gMainProgressBar_ = mel.eval('$tmp = $gMainProgressBar') cmds.progressBar( gMainProgressBar_, e=1, beginProgress=True, isInterruptable=True, status='Polygon Checking...', maxValue=selectPolyCount_ ) warningEdges = [] for i_ in range(selectPolyCount_): if cmds.progressBar(gMainProgressBar_, q=1, isCancelled=1): break cmds.progressBar(gMainProgressBar_, e=1, step=1) #5개 이상 버텍스가 구성된 폴리곤 찾기 cmds.select('%s.f[%d]'%(polyName_,i_), r=1) polyInfo_ = cmds.polyInfo( fv=True ) polySplit_ = polyInfo_[0].split() if (len(polySplit_) > 6): cmds.warning('%s.f[%d]'%(polyName_,int(polySplit_[1].split(":")[0])) + ': Find 5 or more Edges!') warningEdges.append('%s.f[%d]'%(polyName_,int(polySplit_[1].split(":")[0]))) cmds.select(warningEdges, r=1) #select cmds.progressBar(gMainProgressBar_, edit=True, endProgress=True) #progressBar 강제 종료 print("Complte Polygon Check!!") #완료 checkPoly() #선택 #cmds.select('%s.f[4779]'%polyName_)
- checkPolygon_v0.3.py (1.3KB) (0)
댓글 0개
| 엮인글 0개
466개(10/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 42788 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 64097 | 2014.01.08 17:59 | |
284 | [Dev] Maya 2017 DEVKIT (Update3 포함) | 푸딩뱃살 | 3596 | 2017.05.15 18:11 |
283 | [참고] Introduction to Python for Maya | 푸딩뱃살 | 3280 | 2017.05.15 16:02 |
282 | [Base] Layer에 색을 넣으면 [1+1] | 푸딩뱃살 | 3126 | 2017.03.06 11:59 |
281 | [Script] Flexi plane ( ribbon) | 푸딩뱃살 | 4062 | 2017.03.01 20:44 |
280 | [Script] listConnections() | 푸딩뱃살 | 2977 | 2017.02.27 10:47 |
279 | [Rigging] Quick Rig | 푸딩뱃살 | 3218 | 2017.01.31 12:35 |
>> | [Script] 폴리곤 체크 스크립트 | 푸딩뱃살 | 4738 | 2017.01.09 15:21 |
277 | [Modeling] 오브젝트 쉐이더 디스플레이 플립 문제 | 푸딩뱃살 | 1404 | 2017.01.06 14:19 |
276 | [Script] 선택 버텍스 중간에 로케이터 생성 | 푸딩뱃살 | 3125 | 2016.12.23 17:55 |
275 | [Rigging] Unreal Engine에서 사용하기 위한 Maya의 Bind Skin Options | 푸딩뱃살 | 4305 | 2016.10.04 19:20 |
274 | [Rigging] 조인트 연결 생성 시 Orient | 푸딩뱃살 | 2893 | 2016.09.28 20:24 |
273 | [Rigging] 마야2016 weight painting 문제 | 푸딩뱃살 | 3506 | 2016.09.27 00:19 |
272 | [FX] Unity Runtime Animation Recorder & Animation to Maya | 푸딩뱃살 | 2100 | 2016.07.22 15:58 |
271 | [Script] 선택한 mesh의 vertex normal 방향으로 난수 이동 | 푸딩뱃살 | 4534 | 2016.04.23 23:36 |
270 | [참고] Maya와 Maya LT 비교 | 푸딩뱃살 | 3854 | 2015.10.16 16:39 |
269 | [Base] Maya 한글 깨짐 현상 | 푸딩뱃살 | 8878 | 2015.09.17 00:42 |
268 | [Dev] Maya 2013 64bit *.mll을 만들기 위한 Visual Studio Express 2013 | 푸딩뱃살 | 6908 | 2015.08.07 20:42 |
267 | [Plugin] Duplicate Super Special v1.10 | 푸딩뱃살 | 1948 | 2015.05.13 03:08 |
266 | [Plugin] jbUnity Tools v1.44 | 푸딩뱃살 | 2368 | 2015.05.13 03:05 |
265 | [Script] Maya PyQt 관련 문서 | 푸딩뱃살 | 5033 | 2015.03.24 09:42 |