diff --git a/korman/exporter/convert.py b/korman/exporter/convert.py index 2b4c714..b1ce339 100644 --- a/korman/exporter/convert.py +++ b/korman/exporter/convert.py @@ -24,11 +24,9 @@ from . import mesh from . import utils class Exporter: - # These are objects that we need to export as plSceneObjects - _objects = [] - def __init__(self, op): self._op = op # Blender export operator + self._objects = [] @property def age_name(self): diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index 4dd06ee..8291a01 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -43,13 +43,13 @@ _pool_types = ( class ExportManager: """Friendly resource-managing helper class.""" - _nodes = {} - _pages = {} - def __init__(self, version): self.mgr = plResManager() self.mgr.setVer(version) + self._nodes = {} + self._pages = {} + # cheap inheritance for i in dir(self.mgr): if not hasattr(self, i): diff --git a/korman/exporter/material.py b/korman/exporter/material.py index eb008d4..9fae634 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -22,10 +22,9 @@ from . import explosions from . import utils class MaterialConverter: - _hsbitmaps = {} - def __init__(self, exporter): self._exporter = weakref.ref(exporter) + self._hsbitmaps = {} def export_material(self, bo, bm): """Exports a Blender Material as an hsGMaterial""" diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index dd77adb..fb3124e 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -85,13 +85,13 @@ class _DrawableCriteria: class MeshConverter: - _dspans = {} - _mesh_geospans = {} - def __init__(self, exporter): self._exporter = weakref.ref(exporter) self.material = material.MaterialConverter(exporter) + self._dspans = {} + self._mesh_geospans = {} + def _create_geospan(self, bo, mesh, bm, hsgmat): """Initializes a plGeometrySpan from a Blender Object and an hsGMaterial""" geospan = plGeometrySpan()