]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix incorrect plurals in exporter scripts
authorMikko Rasa <tdb@tdb.fi>
Mon, 12 Apr 2021 00:34:10 +0000 (03:34 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 12 Apr 2021 00:34:10 +0000 (03:34 +0300)
Replacing "map" with "atlas" was not correct in the plural case

blender/io_mspgl/export_object.py
blender/io_mspgl/export_scene.py

index 541572f5da9c309d047215d1e6f2f286147d48bd..68a8e93823737c5d695d3065978c30deb3c5ce76 100644 (file)
@@ -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:
index 16435e8f1b487ea089fad5edcdc42092709c677e..cd2bba8e3bb8b036a9b3ad0ea05295423d8a97d6 100644 (file)
@@ -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()