简体   繁体   English

动画脚本-没有名为PyQt4的模块

[英]Animation script - No module named PyQt4

Hi I tried to use a animation script 嗨,我尝试使用动画脚本

free meshcache for maya 免费的Maya MeshCache

# this is the error that I have ( No module named PyQt4 # ) #这是我的错误(没有名为PyQt4#的模块)

Error: line 1: ImportError: file C:/Users/Lav/Documents/maya/2016/scripts/meshCache_script.py line 5: No module named PyQt4 ` 错误:第1行:ImportError:文件C:/Users/Lav/Documents/maya/2016/scripts/meshCache_script.py第5行:没有名为PyQt4的模块

#I am using maya 2016 with service pack in window 7 64 bit #我正在窗口7 64位中使用带有Service Pack的Maya 2016

Is it possible to change this script, so that everybody can use without dealing with pyqt4 install or others. 是否可以更改此脚本,以便每个人都可以使用而无需处理pyqt4 install或其他人。

If I could use this script, I really appreciate for you. 如果可以使用此脚本,我将非常感谢您。

Thank you guys. 感谢大伙们。

In the specific case of that script it should be as easy as replacing: 在该脚本的特定情况下,它应该与替换一样容易:

from PyQt4 import QtGui, QtCore
import sip

with: 与:

from PySide import QtGui, QtCore
import shiboken

and then, on line 32 , replacing: 然后在line 32 ,替换为:

return sip.wrapinstance(long(controlPoniter), QtCore.QObject)

with: 与:

return shiboken.wrapInstance(long(controlPoniter), QtGui.QWidget)

Then follow the instructions here (where I assume you got the script) and it should work. 然后按照此处的说明进行操作(我假设您已获得脚本),它应该可以工作。

What I suggested is what I believe the author was doing with the meshCache_script_2016.py file he mentions, in the page linked above. 我的建议是,我相信作者在上面链接的页面中使用他提到的meshCache_script_2016.py文件。 I downloaded the zipped file from there but couldn't find meshCache_script_2016.py in there, so you might want to ask the author if he omitted it on purpose (in case he realised that other parts of his script and/or plugin would break in Maya 2016, anyway). 我从那里下载了压缩文件,但是在那里找不到meshCache_script_2016.py ,因此您可能想问一下作者是否故意删除了它(以防万一他意识到脚本和/或插件的其他部分会被破坏)仍然是Maya 2016)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM