회원 로그인
정보기억 정보기억에 체크할 경우 다음접속시 아이디와 패스워드를 입력하지 않으셔도 됩니다.
그러나, 개인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 | 조회 5253
  중요! (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개(9/24페이지)
마야
번호 제목 글쓴이 조회 날짜
공지 마야 뷰포트 네비게이션 팁 푸딩뱃살 42289 2020.04.06 17:22
공지 Maya 버전 별 Python 버전 푸딩뱃살 63639 2014.01.08 17:59
304 [Script] Expression Editor에서 원하는 구간 프레임 홀드 cgextra 2117 2017.08.24 12:10
303 [오류] Expression Editor Open Error cgextra 2366 2017.08.24 12:06
302 [Modeling] Maya에서 Collision과 함께 익스포트 (for UE4) 첨부파일 푸딩뱃살 4201 2017.08.24 11:58
301 [Base] Grid(Unit) 설정 for UE4 첨부파일 푸딩뱃살 3814 2017.08.24 10:19
300 [Script] 쉐이더 검색 첨부파일 푸딩뱃살 3483 2017.08.23 11:03
299 [Script] scriptNode 첨부파일 푸딩뱃살 3822 2017.08.22 18:08
298 [Rendering] Maya 2017 Render Setup & Legacy Render Layer 사진 첨부파일 cgextra 3434 2017.08.08 12:12
297 [Script] Maya 2017 Switching to PySide2 푸딩뱃살 4108 2017.07.13 17:26
296 [Plugin] convertInstanceUE4 설치 첨부파일 푸딩뱃살 3596 2017.07.12 14:14
295 [Base] LOD (Level of Detail) 첨부파일 푸딩뱃살 3227 2017.07.06 11:53
294 [Dev] PySide2 첨부파일 푸딩뱃살 3315 2017.07.05 17:55
293 [Script] [펌] Maya 2017 PySide2 Docking Qt QMainWindow 첨부파일 푸딩뱃살 4412 2017.07.05 14:54
292 [Script] Maya 버전 구하기 푸딩뱃살 3161 2017.07.05 12:56
291 [Dev] Maya 2017 Qt5 Designer 실행 시 오류 첨부파일 푸딩뱃살 3878 2017.07.02 20:59
290 [Rigging] 스켈레톤(본) 기반 페이셜 리깅 구조 첨부파일 푸딩뱃살 2863 2017.06.29 12:55
289 [Animation] Controller Nodes 첨부파일 푸딩뱃살 3164 2017.06.09 11:12
>> [Dev] sip / PyQt5 빌드 for Maya 2017 첨부파일 푸딩뱃살 5254 2017.05.31 12:46
287 [Dev] Maya Python API 2.0 : 나의 첫 플러그인 Hello World! 첨부파일 푸딩뱃살 4030 2017.05.19 18:48
286 [Dev] Maya 2017은 Python 버젼 2.7.11 (64bit) 첨부파일 푸딩뱃살 3459 2017.05.18 16:29
285 [Dev] Maya devkit 설정 푸딩뱃살 3338 2017.05.18 14:23