회원 로그인
|
sip / PyQt5 빌드 for Maya 2017
중요! (Maya 2017 Update 3) PyQt5가 충돌(PySide2 바인딩 되어 있으므로) 되서 그런지 스크립트 두번 실행하면 마야가 크러쉬가 난다. Maya 2017 Update 4 일 때 |
:Maya 2017부터 Python 2.7.11 버전과 PyQt5를 지원하게 된다. 그러나 PyQt가 이젠 설치가 아닌 소스를 다운로드 받아 빌드를 해야 하는 번거로움이 생겼다.
시작하기 전에 체크 사항 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 파일 메모장으로 오픈한다.
각 마야 폴더들의 압축되어 있는 파일들을 푼다.
\Maya2017\include\qt-5.6.1-include.tar.gz 압축 파일을 \Maya2017\include\Qt에 압축을 푼다.
\Maya2017\mkspecs\qt-5.6.1-mkspecs.tar.gz 압축 파일을 본 폴더(mkspecs)에 압축을 푼다.
sip 빌드
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=qmlHeaders 경로에서 /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(임의)
빌드 완료.
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에서 빌드하였다. |
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 pauseinstallPyQt5.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 |
- installSip.bat (556B) (0)
- installPyQt5.bat (1.4KB) (0)
- setup.bat (1KB) (0)
- PyQt5&sip_pacakage_for_Maya2017.zip (18.8MB) (2)
- sip_builded_Maya2017.zip (3.2MB) (1)
- PyQt5_builded_Maya2017.zip (15.4MB) (0)
댓글 0개
| 엮인글 0개
466개(9/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 43025 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 64342 | 2014.01.08 17:59 | |
304 | [Script] Expression Editor에서 원하는 구간 프레임 홀드 | cgextra | 2122 | 2017.08.24 12:10 |
303 | [오류] Expression Editor Open Error | cgextra | 2381 | 2017.08.24 12:06 |
302 | [Modeling] Maya에서 Collision과 함께 익스포트 (for UE4) | 푸딩뱃살 | 4236 | 2017.08.24 11:58 |
301 | [Base] Grid(Unit) 설정 for UE4 | 푸딩뱃살 | 3849 | 2017.08.24 10:19 |
300 | [Script] 쉐이더 검색 | 푸딩뱃살 | 3506 | 2017.08.23 11:03 |
299 | [Script] scriptNode | 푸딩뱃살 | 3845 | 2017.08.22 18:08 |
298 | [Rendering] Maya 2017 Render Setup & Legacy Render Layer | cgextra | 3465 | 2017.08.08 12:12 |
297 | [Script] Maya 2017 Switching to PySide2 | 푸딩뱃살 | 4135 | 2017.07.13 17:26 |
296 | [Plugin] convertInstanceUE4 설치 | 푸딩뱃살 | 3624 | 2017.07.12 14:14 |
295 | [Base] LOD (Level of Detail) | 푸딩뱃살 | 3247 | 2017.07.06 11:53 |
294 | [Dev] PySide2 | 푸딩뱃살 | 3335 | 2017.07.05 17:55 |
293 | [Script] [펌] Maya 2017 PySide2 Docking Qt QMainWindow | 푸딩뱃살 | 4441 | 2017.07.05 14:54 |
292 | [Script] Maya 버전 구하기 | 푸딩뱃살 | 3180 | 2017.07.05 12:56 |
291 | [Dev] Maya 2017 Qt5 Designer 실행 시 오류 | 푸딩뱃살 | 3897 | 2017.07.02 20:59 |
290 | [Rigging] 스켈레톤(본) 기반 페이셜 리깅 구조 | 푸딩뱃살 | 2886 | 2017.06.29 12:55 |
289 | [Animation] Controller Nodes | 푸딩뱃살 | 3175 | 2017.06.09 11:12 |
>> | [Dev] sip / PyQt5 빌드 for Maya 2017 | 푸딩뱃살 | 5276 | 2017.05.31 12:46 |
287 | [Dev] Maya Python API 2.0 : 나의 첫 플러그인 Hello World! | 푸딩뱃살 | 4056 | 2017.05.19 18:48 |
286 | [Dev] Maya 2017은 Python 버젼 2.7.11 (64bit) | 푸딩뱃살 | 3487 | 2017.05.18 16:29 |
285 | [Dev] Maya devkit 설정 | 푸딩뱃살 | 3364 | 2017.05.18 14:23 |