Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
2Node Distance
#-2つのノードの間の距離を取得する
def getDistance(posA,posB):
if isinstance(posA,str) == True:
posA = pm.PyNode(posA)
if isinstance(posB,str) == True:
posB = pm.PyNode(posB)
vecA = posA.getTranslation(space="world")
vecB = posB.getTranslation(space="world")
vec = vecA - vecB
return vec.length()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment