gpt4 book ai didi

python - 在 Maya 2017 中使用 PyMel 获取矩阵的逆

转载 作者:太空宇宙 更新时间:2023-11-03 14:09:35 27 4
gpt4 key购买 nike

我一直在查看 PyMel 文档,但我不能从 pymel.core.datatypes 获得矩阵的逆。我的代码是:

inverseM = orientationM*bindRotationM;
inverseM = inverseM.asMatrixInverse()

我刚刚收到错误:错误:第 1 行:AttributeError:文件 S:\Maya_2017_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py 第 54 行:asMatrixInverse #

最佳答案

如果inverseM已经是一个pymel矩阵,则需要inverseM.inverse()。该文档是here 。实际上是the same thing for an OpenMaya MMatrix too

关于python - 在 Maya 2017 中使用 PyMel 获取矩阵的逆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48598523/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com