From: Mikko Rasa Date: Mon, 12 Apr 2021 00:34:10 +0000 (+0300) Subject: Fix incorrect plurals in exporter scripts X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=cfd713763d3944d45abeffd6dbb008d36ee892bf Fix incorrect plurals in exporter scripts Replacing "map" with "atlas" was not correct in the plural case --- diff --git a/blender/io_mspgl/export_object.py b/blender/io_mspgl/export_object.py index 541572f5..68a8e938 100644 --- a/blender/io_mspgl/export_object.py +++ b/blender/io_mspgl/export_object.py @@ -95,9 +95,9 @@ class ObjectExporter: progress.pop_task() - def export_object_resources(self, context, obj, resources, progress, material_atlass=None): - if material_atlass is None: - material_atlass = {} + def export_object_resources(self, context, obj, resources, progress, material_atlases=None): + if material_atlases is None: + material_atlases = {} lods = self.collect_object_lods(obj) @@ -120,11 +120,11 @@ class ObjectExporter: if not all(atlas_flags) or key_mismatch: raise Exception("Conflicting settings in object materials") - if material_atlas_key in material_atlass: - material_atlas = material_atlass[material_atlas_key] + if material_atlas_key in material_atlases: + material_atlas = material_atlases[material_atlas_key] else: material_atlas = create_material_atlas(context, l.data.materials[0]) - material_atlass[material_atlas_key] = material_atlas + material_atlases[material_atlas_key] = material_atlas tech_name = "{}.tech".format(material_atlas.name) if tech_name not in resources: diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index 16435e8f..cd2bba8e 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -92,11 +92,11 @@ class SceneExporter: object_export = ObjectExporter() object_export.single_file = False - material_atlass = {} + material_atlases = {} for i, o in enumerate(objs): progress.push_task_slice(o.name, i, len(objs)) - object_export.export_object_resources(context, o, resources, progress, material_atlass=material_atlass) + object_export.export_object_resources(context, o, resources, progress, material_atlases=material_atlases) obj_name = o.name+".object" resources[obj_name] = object_export.export_object(context, o, progress, resources=resources) progress.pop_task()