1

当你所拥有的只是那个地理的一个组成部分(uv、面、顶点、边缘)时,你如何获得一个地理的名称?

所以例如我有:

MeshVertex(u'pCubeShape1.vtx[0]') #replace that with any of the following (uvs, faces, edges)

我想结束的是:

nt.Transform(u'pCube1')

我怎样才能做到这一点?

4

2 回答 2

1

作为你的例子,让我们说v = MeshVertex(u'pCubeShape1.vtx[0]')

import pymel.core as pm
transform = v.node().getParent()
select(transform)

我知道这个问题已经得到解答,但我想我会发布我的做法,以便其他人可以看到不同的方式:)

希望这可以帮助

于 2013-11-21T21:05:28.223 回答
1

vtx = MeshVertex(u'pCubeShape1.vtx[0]')

然后可以使用以下方法找到变换/地理:

import pymel.core as pc
transforms = pc.listTransforms(vtx.node())
transform = transforms[0] #in case there is only one.
于 2013-11-11T12:30:46.180 回答