sara
sara

Reputation: 1

How can I get the real pivot position of a node with assimp?

How to use assimp to obtain the real position of the pivot point.

The position I got is the same with Maya Channel Box, but I want to know the true location of the pivot point when it has been changed with the key [D] in Maya or the transform has been frozen.

The node position should be the same with Transform Component in unity.

Thanks!

Upvotes: 0

Views: 382

Answers (1)

zeplaro
zeplaro

Reputation: 25

you could add the xform rotatepivot and xform translation :

import maya.cmds as mc

obj = 'pCube1'
rotatepivot = mc.xform(obj, q=1, rotatePivot=True)
transformPivot = mc.xform(obj, q=1, translation=True)

truePivot = [x+y for x,y in zip(rotatepivot,transformPivot)]

Upvotes: 1

Related Questions