회원 로그인
정보기억 정보기억에 체크할 경우 다음접속시 아이디와 패스워드를 입력하지 않으셔도 됩니다.
그러나, 개인PC가 아닐 경우 타인이 로그인할 수 있습니다.
PC를 여러사람이 사용하는 공공장소에서는 체크하지 마세요.
소셜네트워크 서비스를 통해서 로그인하시면 별도의 로그인 절차없이 회원서비스를 이용하실 수 있습니다.


최근 게시물

1.노션에서 작성 중

1.노션에서 작성 중

개편하기 전까지 노션에서 작성 중

2024.04.04//read more

2.ChatGPT

2.ChatGPT

OpenAI로 대규모 언어 모델대화형...

2023.03.16//read more

3.노코딩 게임 엔진 - 빌..

3.노코딩 게임 엔진 - 빌..

빌드 지원안드로이드iOS윈도우즈특이사...

2023.03.14//read more

4.(완료) 미접속 회원 정..

4.(완료) 미접속 회원 정..

[완료] 36명의 회원을 정리하였습니...

2023.02.16//read more

5.매뉴얼 플러스 - 전자제..



안정적인 DNS 서비스 DNSEver
DNS Powered by DNSEver.com


sip / PyQt5 빌드 for Maya 2017

푸딩뱃살 | 2017.05.31 12:46 | 조회 5248
  중요! (Maya 2017 Update 3)
PyQt5가 충돌(PySide2 바인딩 되어 있으므로) 되서 그런지 스크립트 두번 실행하면 마야가 크러쉬가 난다.
Maya 2017 Update 4 일 때 크러쉬가 안난다? 크러쉬 난다.

sip / PyQt5 빌드 for Maya 2017

:Maya 2017부터 Python 2.7.11 버전과 PyQt5를 지원하게 된다. 그러나 PyQt가 이젠 설치가 아닌 소스를 다운로드 받아 빌드를 해야 하는 번거로움이 생겼다.
2017용 설치 가이드가 없어서 일부 'PyQt for Autodesk Maya 2016 64bit' 가이드와 구글링 조합으로 참고했다. 

 시작하기 전에 체크 사항
1.실행되어 있는 Maya 2017이 있다면 모두 종료한다.
2.진행하는 과정에서 가상 드라이브 M드라이브와 V드라이브를 사용하게 된다.
3.sip 빌드는 Visual Studio Community 2015, PyQt5는 Visual Studio Express 2012에서 빌드한다.;; (sip의 VS 2012 빌드는 차후에 따로 포스팅 하겠다.)


PyQt5을 빌드하기 전에 먼저 sip 빌드을 한다.


다운로드(2017.5.31)
sip-4.19.2 
PyQt-win-qpl-5.8.2 

D:\sip-4.19.2
D:\PyQt5-win-qpl-5.8.2
폴더로 각각 압축을 푼다.


환경 설정 
1. Developer Kit 다운로드 (Maya 2017 Update 3 - Developer Kit) 
2. C:\Users\사용자\에 devkitBase 폴더로 압축 해제한다.
3. \devkitBase\devkit\applications 폴더에 devkit과 mkspecs 폴더를 \Maya2017 폴더에 복사한다. (필요한 경우 덮어씌우기)


qt.conf 파일 수정
\Maya2017\bin 폴더 안에 qt.conf 파일 메모장으로 오픈한다.
[Paths]
Prefix=$(MAYA_LOCATION)
Libraries=lib
Binaries=bin
Headers=include/Qt
Data=.
Plugins=qt-plugins
Translations=qt-translations
Qml2Imports=qml
Headers 경로에서 /Qt 추가하고 저장한다.

각 마야 폴더들의 압축되어 있는 파일들을 푼다.
\Maya2017\include\qt-5.6.1-include.tar.gz 압축 파일을 \Maya2017\include\Qt에 압축을 푼다.
\Maya2017\mkspecs\qt-5.6.1-mkspecs.tar.gz 압축 파일을 본 폴더(mkspecs)에 압축을 푼다.


sip 빌드

 Visual Studio Community 2015에서 빌드하였다.

현 시스템이나 Maya 버전에 맞게 수정 후 installSip.bat 저장한다.
installSip.bat(임의)
REM @echo off
set MAYAPYQTBUILD=%~dp0
REM set MAYAPYQTBUILD=%MAYAPYQTBUILD:~0,-1%
if exist v:\nul subst v: /d
subst v: "%MAYAPYQTBUILD%"

set SIPDIR=v:\sip-4.19.2
set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0
if ["%LIBPATH%"]==[""] call "%MSVC_DIR%\VC\vcvarsall" amd64

set MAYA_LOCATION=C:\Program Files\Autodesk\Maya2017
set INCLUDE=%INCLUDE%;%MAYA_LOCATION%\include\python2.7
set LIB=%LIB%;%MAYA_LOCATION%\lib

pushd %SIPDIR%
"%MAYA_LOCATION%\bin\mayapy" configure.py
nmake
nmake install
popd
pause
.bat 파일을 탐색기에서 우클릭 후 '관리자 권한으로 실행' 한다.



빌드 완료.


파일을 찾을 수 없다느니, 파일을 복사할 수 없다느니 하는 오류가 발생했는지 확인한다.
오류가 있으면 자신의 설치 경로들(VC 경로, 마야 설치 경로 등)을 확인 후 .bat 파일을 수정한다.

'또한 잘못된 매개 변수입니다 - 드라이브명:'이 나오면 가상 드라이브 설정 오류이므로 도스 프롬프트에서
subst v: /d를 하여 가상 드라이브를 해제 시킨다.


마야을 실행 후 확인한다.
import sip


PyQt5 빌드

빌드 가이드에 아래 주의 사항이 있다. 

 Note that the pyQT generated makefile are using the make macro <? while building 'pylupdate'. Unfortunately, it will hang forever on Windows, and will complain about an undefined macro <? ... This macro means to use the first build dependency file as argument, but nmake does not seems to like it. The script below will bypass the makefile rule, so it should work just fine.

그러나, 가이드에선 오타로 인해 사용할 수 없었고, Visual Studio Community 2015에서 빌드를 하려고 하였지만 되질 않아 Visual Studio Express 2012를 설치해야만 했다.
또한, Visual Studio Express 2012에서는 64bit 빌드를 사용할 수 없다. 허나 가능하게~ 

 그러므로, Visual Studio Express 2012에서 빌드하였다.


Visual Studio Express 2012를 설치 한다.
1.설치 폴더 \Microsoft Visual Studio 11.0\VC\bin\x86_amd64 폴더를 amd64 폴더로 복사한다.
2.\amd64 폴더 안 vcvarsx86_amd64.bat 파일을 vcvars64.bat로 변경한다.

Maya 2017용 PyQt5 설치 스크립트를 찾아 조금 수정하였다.  

setup.bat 파일
REM @echo off

set MAYAVERSION=2017
set ADSKQTVERSION=5.6.1
set SIPVERSION=4.19.2
set PYQTVERSION=5.8.2
set MAYADRIVE=m:
set BUILDDRIVE=v:
 
if exist %MAYADRIVE%\nul subst %MAYADRIVE% /d
subst %MAYADRIVE% "C:\Program Files\Autodesk\Maya%MAYAVERSION%"
set MAYA_LOCATION=%MAYADRIVE%
 
set MAYAPYQTBUILD=%~dp0
rem Removing trailing \
set MAYAPYQTBUILD=%MAYAPYQTBUILD:~0,-1%
 
if exist %BUILDDRIVE%\nul subst %BUILDDRIVE% /d
subst %BUILDDRIVE% "%MAYAPYQTBUILD%\"
 
set SIPDIR=%BUILDDRIVE%\sip-%SIPVERSION%
set PYQTDIR=%BUILDDRIVE%\PyQt5_gpl-%PYQTVERSION%
rem set ADSKQTDIR=%BUILDDRIVE%\qt-%ADSKQTVERSION%
set QTDIR=%MAYA_LOCATION%
 
set PATH=%QTDIR%\bin;%PATH%
set MSVC_VERSION=2012
set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0
set QMAKESPEC=%QTDIR%\mkspecs\win32-msvc%MSVC_VERSION%
set _QMAKESPEC_=win32-msvc%MSVC_VERSION%
 
if ["%LIBPATH%"]==[""] call "%MSVC_DIR%\VC\vcvarsall" amd64
 
set INCLUDE=%INCLUDE%;%MAYA_LOCATION%\include\python2.7
set LIB=%LIB%;%MAYA_LOCATION%\lib

pause
installPyQt5.bat 파일
REM @echo off

set XXX=%~dp0
if ["%MAYAPYQTBUILD%"]==[""] call "%XXX%setup.bat"
 
set QMAKESPEC=%QTDIR%\mkspecs\%_QMAKESPEC_%
if not exist "%QMAKESPEC%\qmake.conf" (
     echo "You need to uncompress %MAYA_LOCATION%\mkspecs\qt-5.6.1-mkspecs.tar.gz !"
     goto end
)
if not exist "%MAYA_LOCATION%\include\Qt\QtCore\qdir.h" (
    echo "You need to uncompress %MAYA_LOCATION%\include\qt-5.6.1-include.tar.gz in %MAYA_LOCATION%\include\Qt !"
     goto end
)
findstr /L /C:"Headers=include/Qt" "%MAYA_LOCATION%\bin\qt.conf" >nul 2>&1
if ERRORLEVEL 1 (
    echo "You need to edit %MAYA_LOCATION%\bin\qt.conf to use 'Headers=include/Qt'"
    goto end
)
findstr /L /C:"-lqtmain -lshell32" "%QTDIR%\mkspecs\common\msvc-desktop.conf" >nul 2>&1
if ERRORLEVEL 1 (
    echo "You need to edit %QTDIR%\mkspecs\common\msvc-desktop.conf to use 'QMAKE_LIBS_QT_ENTRY     = -lqtmain -lshell32'"
    goto end
)
if not exist "%MAYA_LOCATION%\include\Qt\qtnfc.disabled" (
    echo "You need to rename %MAYA_LOCATION%\include\Qt\qtnfc to %MAYA_LOCATION\include\Qt\qtnfc.disabled"
     goto end
)
     
pushd %PYQTDIR%
 
"%MAYA_LOCATION%\bin\mayapy" configure.py --spec %QMAKESPEC% LIBDIR_QT="%QTDIR%\lib" INCDIR_QT="%QTDIR%\include\Qt" MOC="%QTDIR%\bin\moc.exe" --sip="%QTDIR%\Python\sip.exe" --sip-incdir="%QTDIR%\Python\include" -w --no-designer-plugin
nmake
nmake install
popd

:end

subst m: /d
subst v: /d

pause

1. \Maya2017\mkspecs\common\msvc-desktop.conf 파일 수정
#중략...
QMAKE_LIBS_QT_ENTRY = -lqtmain -lshell32
#중략...
2. \Maya2017\include\Qt\qtnfc 폴더를 qtnfc.disabled로 변경


installPyQt5.bat(임시) 파일을 우클릭 후 '관리자 권한으로 실행' 한다.
1. '계속하려면 아무 키나 누르십시오...' 나오면 아무키 누른다.
2. Python Licence가 나오면 yes



빌드 시작 (시간이 제법 걸린다.)


마야 실행 후 확인한다.
import PyQt5


복사해서 사용될지 모르겠지만 패키징 파일을 첨부한다.(PyQt5&sip_pacakage_for_Maya2017.zip)
\Maya2017\Python 폴더에 넣어준다.(덮어씌운다는 메세지가 나온다면 무시)

빌드 된 각각의 파일은
PyQt5_builed_Maya2017.zip, sip_
builed_Maya2017.zip 


466개(1/24페이지)
마야
번호 제목 글쓴이 조회 날짜
공지 마야 뷰포트 네비게이션 팁 푸딩뱃살 42045 2020.04.06 17:22
공지 Maya 버전 별 Python 버전 푸딩뱃살 63453 2014.01.08 17:59
464 [Dev] Autodesk Maya Devkit 다운로드 첨부파일 푸딩뱃살 674 2023.01.28 14:28
463 [Base] (해결 중) modules 환경설정 중 푸딩뱃살 605 2022.11.09 11:47
462 [Script] pymel 딕셔너리형 사용 시 KeyError 푸딩뱃살 805 2022.11.07 12:08
461 [오류] Building Numpy for Maya Python 2.7.x 푸딩뱃살 570 2022.10.23 14:38
460 [Base] 뷰포트에서 조절자가 안 보일때 첨부파일 푸딩뱃살 742 2022.10.13 15:47
459 [Rigging] mirror joints 사용 시 유의 사항 푸딩뱃살 742 2022.10.04 10:46
458 [Script] 2022에서 enum34 모듈 설치 금지 첨부파일 푸딩뱃살 586 2022.08.17 18:08
457 [Script] pymel 예제 푸딩뱃살 605 2022.07.05 19:20
456 [Script] 인코드 / 디코드 - 2.7 한글 사용 푸딩뱃살 875 2022.03.08 17:52
455 [Dev] ui 없이 mayapy로 자동화 첨부파일 푸딩뱃살 677 2022.02.17 13:56
454 [Dev] mayapy로 ui파일 py로 푸딩뱃살 515 2022.02.15 18:20
453 [오류] Error : MayaBonusTools 푸딩뱃살 884 2022.01.21 17:52
452 [오류] Error: ModuleNotFoundError 푸딩뱃살 745 2022.01.21 16:24
451 [Dev] mayapy 첨부파일 푸딩뱃살 622 2022.01.19 20:08
450 [Base] function selCom at 0x7f29c5c04aa0 첨부파일 푸딩뱃살 589 2022.01.19 17:24
449 [Base] wireframe on shaded 단축키 만들기 첨부파일 푸딩뱃살 877 2022.01.04 10:55
448 [오류] OpenCL Error 푸딩뱃살 506 2021.12.28 01:40
447 [Script] Easily Translate MEL Commands to Python 첨부파일 푸딩뱃살 798 2021.12.02 11:22
446 [Base] output window 띄우지 않기 첨부파일 푸딩뱃살 778 2021.11.24 21:44
445 [Rigging] shapeEditorManager 삭제 안됨 푸딩뱃살 855 2021.11.12 23:30