所以我在Maya中有兩個矩陣。我想反映關於另一個矩陣的x和y的一個矩陣。Maya Python API縮放關於另一個矩陣的矩陣
因此,作爲一個例子:
對象1的矩陣是這樣: [1.0,0.0,0.0,0.0,0.0,0.70710678118654746,0.70710678118654757,0.0,0.0,-0.70710678118654757,0.70710678118654746,0.0,0.0,0.0 ,0.0,1.0] 這是沿x軸旋轉45度原點的物體。對象2的矩陣是這樣的: [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,2.0,2.0,2.0,1.0] 坐在2處, 2,2在世界空間中沒有旋轉值。
當object1的反射的scaleX我們得到這樣的矩陣: [1.0,0.0,-0.0,0.0,-0.0,0.70710678118654746,-0.70710678118654757,0.0,0.0,0.70710678118654757,0.70710678118654746,0.0,2.0,2.8284271247461898, -2.2204460492503131e-16,1.0]
這只是我查詢矩陣,當我手動反映對象的規模。在Python API中這樣做的方法是什麼?
我假設某種方式與MTransformationMatrix,但無法找出那一個。
任何幫助將不勝感激!
聽起來不錯我會給它一個回去找回你。感謝您的迴應。我已經手動構建矩陣,但這對於反映它是有意義的。 – chribis
如果您尚未完成此操作,則應查看Transform(http://download.autodesk.com/us/maya/2011help/Nodes/transform.html)的文檔,其中對變換順序進行了佈局(maya使用post multiply :按照我上面的示例,按照從左到右的順序進行轉換) – theodox
所以我實際上注意到了一個問題。當反思說使用我的代碼旋轉的球體時,它不會正確反映矩陣。想法?再次感謝所有的幫助。 – chribis