Browse Source

Enable export of "Auto Load" and "Local Only" page options.

pull/385/head v0.15
Joseph Davies 1 year ago committed by Adam Johnson
parent
commit
01a64589bc
  1. 2
      korman/exporter/convert.py
  2. 9
      korman/exporter/manager.py

2
korman/exporter/convert.py

@ -247,7 +247,7 @@ class Exporter:
for page in age_info.pages:
if page.enabled and ver in page.version:
external = page.page_type == "external"
mgr.create_page(age_name, page.name, page.seq_suffix, external=external)
mgr.create_page(age_name, page.name, page.seq_suffix, external=external, auto_load=page.auto_load, local_only=page.local_only)
mgr.create_builtins(age_name, age_info.use_texture_page)
def _export_actor(self, so, bo):

9
korman/exporter/manager.py

@ -169,7 +169,7 @@ class ExportManager:
"or the game may crash!"
)
def create_page(self, age, name, id, *, builtin=False, external=False):
def create_page(self, age, name, id, *, builtin=False, external=False, auto_load=True, local_only=False):
location = plLocation(self.mgr.getVer())
location.prefix = bpy.context.scene.world.plasma_age.seq_prefix
if builtin:
@ -192,7 +192,12 @@ class ExportManager:
self.mgr.AddPage(info)
if not builtin:
self._age_info.addPage((name, id, 0))
flags = 0
if not auto_load:
flags |= plAgeInfo.kFlagPreventAutoLoad
if local_only:
flags |= plAgeInfo.kFlagIsLocalOnly
self._age_info.addPage((name, id, flags))
if not external:
if self.getVer() <= pvPots:
node = plSceneNode(f"{age}_District_{name}")

Loading…
Cancel
Save