Export Network Update

This commit is contained in:
2026-10-06 11:34:17 -07:00
parent 4ab646015d
commit 211cba61a6
4 changed files with 7 additions and 6 deletions

View File

@ -224,7 +224,7 @@ class LeenkxExporter:
if wrd.lnx_network == 'Enabled':
cls.export_network = True
cls.export_torrent = False
if wrd.lnx_torrent == 'Enabled':
if wrd.lnx_torrent == 'Enabled' and wrd.lnx_network != 'Disabled':
cls.export_torrent = True
@staticmethod

View File

@ -248,7 +248,7 @@ def export_data_impl(fp, sdk_path):
export_navigation = bpy.data.worlds['Lnx'].lnx_navigation != 'Disabled'
export_ui = bpy.data.worlds['Lnx'].lnx_ui != 'Disabled'
export_network = bpy.data.worlds['Lnx'].lnx_network != 'Disabled'
export_torrent = bpy.data.worlds['Lnx'].lnx_torrent != 'Disabled'
export_torrent = bpy.data.worlds['Lnx'].lnx_torrent != 'Disabled' and bpy.data.worlds['Lnx'].lnx_network != 'Disabled'
assets.reset()
mat_state.material_cache.clear()
@ -356,7 +356,7 @@ def export_data_impl(fp, sdk_path):
if wrd.lnx_network == 'Enabled':
export_network = True
if wrd.lnx_torrent == 'Enabled':
if wrd.lnx_torrent == 'Enabled' and wrd.lnx_network != 'Disabled':
export_torrent = True
modules = []

View File

@ -295,7 +295,7 @@ def init_properties():
bpy.types.World.lnx_torrent = EnumProperty(
items=[('Disabled', 'Disabled', 'Disabled'),
('Enabled', 'Enabled', 'Enabled')],
name="Torrent", default='Disabled', description="Include Torrent (Leenkx) library", update=assets.invalidate_compiler_cache)
name="P2P", default='Disabled', description="Include P2P (Leenkx) library", update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_torrent_download_dir = StringProperty(name="Download Path", description="Directory torrent downloads are written to. Relative paths resolve against the project directory at runtime; absolute paths are used as-is", default="Downloads", subtype='DIR_PATH', update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_torrent_trackers = CollectionProperty(name="Torrent Trackers", description="Default torrent tracker announce URLs", type=bpy.types.PropertyGroup)
bpy.types.World.lnx_torrent_trackers_index = IntProperty(name="Torrent Tracker Index", default=0)

View File

@ -1358,6 +1358,7 @@ class LNX_PT_ProjectModulesPanel(bpy.types.Panel):
layout.prop(wrd, 'lnx_navigation_engine')
layout.prop(wrd, 'lnx_ui')
layout.prop(wrd, 'lnx_network')
if wrd.lnx_network != 'Disabled':
layout.prop(wrd, 'lnx_torrent')
layout.prop_search(wrd, 'lnx_khafile', bpy.data, 'texts')
@ -1472,7 +1473,7 @@ class LNX_PT_LeenkxNetworkPanel(bpy.types.Panel):
wrd = bpy.data.worlds['Lnx']
col = layout.column()
col.enabled = wrd.lnx_torrent != 'Disabled'
col.enabled = wrd.lnx_torrent != 'Disabled' and wrd.lnx_network != 'Disabled'
col.prop(wrd, "lnx_torrent_download_dir")
col.prop(wrd, "lnx_torrent_peer_timeout")