From 5183adb4693702d96b1f3d3327162b23eb46cef1 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 24 Oct 2019 20:41:04 -0400 Subject: [PATCH] Fix #154. --- korman/exporter/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index afd5bd5..dd847ce 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -283,11 +283,11 @@ class ExportManager: # AgeSDL sdl_filename = "{}.sdl".format(fixed_agename) age_sdl = get_text(sdl_filename) - if age_sdl is not None: - sdl_code = None - else: + if age_sdl is None: sdl_code = very_very_special_sdl.format(age_name=fixed_agename).lstrip() - output.add_sdl(sdl_filename, text_id=age_sdl, str_data=sdl_code) + age_sdl = bpy.data.texts.new(sdl_filename) + age_sdl.from_string(sdl_code) + output.add_sdl(sdl_filename, text_id=age_sdl) def save_age(self): self._write_age()