I don’t won’t to turn this into a contest who can right the shortest python.. but ðŸ™‚

for times when you need to iterate over “groups” of lines i like to use:

i = iter(lines)

for jnt, parent, pos in zip(i,i,i):

…

it takes away dealing with indexing into lines with offsets.

Another thing would be to use a library for 3d vectors and matrices, where you can simply multiply posVector * jointScale. People seem to like http://partiallydisassembled.net/euclid/index.html pyeuclid.

Or if you’re doing that as a script inside some modelling package, check if it exposes some types for dealing with vectors and 3d math.

]]>