From 5426643eeca2053a0aa482a8d61f3a8a78d4e9b7 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 11 Feb 2021 15:18:08 -0500 Subject: [PATCH] Round funny values to hide float precision details. --- korman/exporter/manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index 2599673..f2f2d26 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -321,16 +321,16 @@ class ExportManager: with output.generate_dat_file(f, enc=self._encryption) as stream: fni = bpy.context.scene.world.plasma_fni - stream.writeLine("Graphics.Renderer.SetClearColor {} {} {}".format(*fni.clear_color)) - stream.writeLine("Graphics.Renderer.SetYon {}".format(fni.yon)) + stream.writeLine("Graphics.Renderer.SetClearColor {.2f} {.2f} {.2f}".format(*fni.clear_color)) + stream.writeLine("Graphics.Renderer.SetYon {.1f}".format(fni.yon)) if fni.fog_method == "none": stream.writeLine("Graphics.Renderer.Fog.SetDefLinear 0 0 0") else: - stream.writeLine("Graphics.Renderer.Fog.SetDefColor {} {} {}".format(*fni.fog_color)) + stream.writeLine("Graphics.Renderer.Fog.SetDefColor {.2f} {.2f} {.2f}".format(*fni.fog_color)) if fni.fog_method == "linear": - stream.writeLine("Graphics.Renderer.Fog.SetDefLinear {} {} {}".format(fni.fog_start, fni.fog_end, fni.fog_density)) + stream.writeLine("Graphics.Renderer.Fog.SetDefLinear {.2f} {.2f} {.2f}".format(fni.fog_start, fni.fog_end, fni.fog_density)) elif fni.fog_method == "exp": - stream.writeLine("Graphics.Renderer.Fog.SetDefExp {} {}".format(fni.fog_end, fni.fog_density)) + stream.writeLine("Graphics.Renderer.Fog.SetDefExp {.2f} {.2f}".format(fni.fog_end, fni.fog_density)) def _write_pages(self): age_name = self._age_info.name