4
4
mirror of https://github.com/H-uru/korman.git synced 2025-07-15 10:54:18 +00:00
It appears that we were storing PyHSPlasma objects in class attributes, so
they were being held after the plResManager went away--therefore their
keys were nuked. We should probably be holding keys and not objects, but
this fix works regardless.
This commit is contained in:
2014-07-06 17:43:14 -04:00
parent 7917077ee0
commit 2fb944c9ce
4 changed files with 8 additions and 11 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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"""

View File

@ -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()