7 return 1.055*(l**(1/2.4))-0.055
9 def get_colormap(srgb):
16 if path.startswith("//"):
18 return os.path.basename(path)
20 def make_unique(values):
29 def get_linked_node_and_socket(node_tree, socket):
30 for l in node_tree.links:
31 if socket==l.to_socket:
32 return (l.from_node, l.from_socket)
33 elif socket==l.from_socket:
34 return (l.to_node, l.to_socket)
37 def compute_bounding_sphere(points):
38 p1 = max(((p, p.length) for p in points), key=lambda x:x[1])[0]
39 p2 = max(((p, (p-p1).length) for p in points), key=lambda x:x[1])[0]
41 radius = (p1-p2).length/2
45 center += d*(1-radius/d.length)/2
46 radius = (radius+d.length)/2