Instantly share code, notes, and snippets.

What would you like to do?
2Node Distance
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