]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/util.py
Always export texture data inline if there's no image file
[libs/gl.git] / blender / io_mspgl / util.py
index 3b5e8cd56f3349d6ab1f094b8a25cde41015f558..6e8ec7746bde7c41b5c4791dfca602d7dd65503b 100644 (file)
@@ -48,3 +48,16 @@ class Progress:
                        if self.window_manager:
                                self.window_manager.progress_update(value)
                        self.last = value
+
+
+def linear_to_srgb(l):
+       if l<0.0031308:
+               return 12.92*l
+       else:
+               return 1.055*(l**(1/2.4))-0.055
+
+def get_colormap(srgb):
+       if srgb:
+               return linear_to_srgb
+       else:
+               return lambda x: x