def addToPathsRecursively(paths, vector3Lists):
 if (vector3Lists.__class__ == Vector3):
  paths.append([vector3Lists])
  return
 path = []
 for vector3List in vector3Lists:
  if (vector3List.__class__ == list):
   addToPathsRecursively(paths, vector3List)
  elif (vector3List.__class__ == Vector3):
   path.append(vector3List)
 if (len(path) > 0):
  paths.append(path)

def addToPathsRecursively ( paths , vector3Lists ) : if ( vector3Lists . __class__ == Vector3 ) : paths . append ( [ vector3Lists ] ) return path = [ ] for vector3List in vector3Lists : if ( vector3List . __class__ == list ) : addToPathsRecursively ( paths , vector3List ) elif ( vector3List . __class__ == Vector3 ) : path . append ( vector3List ) if ( len ( path ) > 0 ) : paths . append ( path )
add to vector3 paths recursively .